![ישן](https://static.fresh.co.il/images/vBulletin/statusicon/post_old.gif)
29-09-2007, 18:53
|
![צלמית המשתמש של דור](image.php?u=3929&dateline=1201940655) |
|
|
חבר מתאריך: 09.04.02
הודעות: 8,000
|
|
בהנחה שאין לך טקסט שמשלב עברית ואנגלית, הקוד הבא יעשה את העבודה:
קוד PHP:
<?php
function mb_strrev($str, $encoding)
{
return mb_convert_encoding(strrev( mb_convert_encoding($str, 'UTF-16BE', $encoding) ), $encoding, 'UTF-16LE');
}
$text = 'טקסט עברי בלבד';
$img = imagecreate(150, 50);
imagecolorallocate($img, 255, 255, 0);
$color = imagecolorallocate($img, 0, 0, 0);
imagettftext($img, 14, 0, 15, 30, $color, 'arial.ttf', mb_strrev($text, 'UTF-8'));
header('Content-type: image/png');
imagepng($img);
|