Created
April 14, 2015 11:58
-
-
Save rafasashi/5c39c972aa43edb74c35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_substr($content='',$pos_start=0,$num_char=1){ | |
$substr=''; | |
if(function_exists('mb_substr')){ | |
$substr=mb_substr($content,$pos_start,$num_char,CHARSET); | |
} | |
else{ | |
$substr=substr($content,$pos_start,$num_char); | |
} | |
return $substr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment