Answer by TeAmEr for Why is PHP Treating Carriage Return / Linefeed Combo as...
convert the combo \r\n to \n , do whatever u need , then revert all \n's to the combo ...str_replace("\r\n","\n",$value);if (strlen($value) > 41) { $value = substr($value, 0,...
View ArticleWhy is PHP Treating Carriage Return / Linefeed Combo as a Single Byte?
I have a php script that truncates a string at 41 bytes. I call strlen on the string to check its size. However, if the string has a "\r\n" combo, this combo is treated as one byte. So in my case...
View Article
More Pages to Explore .....