hebrev 


string apg

CONVERT a logical Hebrew text to visual text.





This function tries to avoid breaking words.



<?php

str hebrev 
( str $hebrew_text [, int $max_chars_per_line = 0 ] )


where,

$str = The Hebrew STRING to convert to visual text

$max_chars_per_line 
= To control the maximum number of 
                                                             characters per line 
                                                             that will be returned 
?>
 

$str


The Hebrew STRING to convert to visual text.



$max_chars_per_line


To control the maximum number of characters per line that will be returned.



  1 EXERCISE   

<?php

$hebstr01 
= 'היי, זה רק דוגמה.';

// Hello, this is just an example.

$vistxt01 = hebrev($hebstr01);

echo 
$vistxt01 . '<br>';

?> 

 RESULT   

.היי, זה רק דוגמה

  2 EXERCISE   

<?php

$hebstr02 
= 'הלו.
זוהי רק דוגמה נוספת.'
;

// Hello.
// This is just another example.

$vistxt02 = hebrev($hebstr02);

echo 
$vistxt02 . '<br>';

?> 

 RESULT   

הלו. .זוהי רק דוגמה נוספת

  3 EXERCISE   

<?php

echo "Testing hebrev() : basic functionality.<br><br><br>";

$hebrew_text = "פונקציה זו מנסה להימנע משבירת מילים.";

var_dump(hebrev($hebrew_text));
echo 
'<br><br>';
var_dump(hebrev($hebrew_text, 15));

?>