Display the text box

iconv_substr()

« iconv_strrpos | idate »
<?php
$string 
iconv_substr (
    
// string $str
    
// int $offset
    
// [int $length = iconv_strlen($str, $charset)]
    
?  // [string $charset = ini_get("iconv.internal_encoding")]
);

// enter non ASCII characters in hex in $str if $charset is not UTF-8
// the result $string may not display properly if $charset is not UTF-8
?>
Result
$string = 'üfung'
Examples
#1 iconv_substr  ("Prüfung Prüfung",
 
2,
 
5,
 
"UTF-8")
See also
mb_strcut, mb_substr, substr