Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. $white = imagecolorallocate($background, 255, 255, 255);
  3. $fontfile = "davidtr.ttf";
  4. $string = "מחלדגכ";
  5. imagettftext($background, 12, 360, 3, 17, $white, $fontfile, $string);
  6.  
  7. ?>
  8.  
  9. $white = imagecolorallocate($background, 255, 255, 255);
  10. $fontfile = "davidtr.ttf";
  11. $string = strrev("עברית");
  12. //imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function');
  13. imagettftext($background, 12, 0, 3, 17, $white, $fontfile, $string);
  14.  
  15. function utf8_strrev($str){
  16. preg_match_all('/./us', $str, $ar);
  17. return join('',array_reverse($ar[0]));
  18. }
  19.  
  20. $string = "מחל 65 דגכ";
  21. echo utf8_strrev($string);
  22. //Now string revered but 65 converted to 56
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement