PHP Function Reference

PHP hebrev() Function



The PHP hebrev() function converts logical Hebrew text to visual text. Hebrew visual requires no special right-to-left character support to be displayed properly, making it very useful for displaying Hebrew text on the web. The function tries to avoid breaking words if possible.

Syntax

hebrev(string, max_chars_per_line)

Parameters

string Required. Specify the Hebrew input string.
max_chars_per_line Optional. Specify maximum number of characters per line that will be returned.

Return Value

Returns the visual string.

Example:

In the example below, hebrev() function returns the trimmed version of the given string.

<?php
echo hebrev("? ?? ??? ????");
?>

The output of the above code will be:

???? ??? ?? ?

❮ PHP String Reference