note 55962 deleted from function.fgetcsv by victor
| From: | victor@php.net | Date: | Fri, 19 Aug 2005 04:27:56 +0000 |
| Subject: | note 55962 deleted from function.fgetcsv by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93872@lists.php.net to get a copy of this message | ||
Note Submitter: romacknatividad at yahoo dot com
----
// revised -- oops sori :)
function stripWhitespace($str){
// str_replace($searchStr, $replaceWithStr, $targetString)
$str = str_replace("\0", "", $str); // NUL 0
$str = str_replace(chr(0x09), "", $str); // \t 9
$str = str_replace(chr(0x0A), "", $str); // \n 10
$str = str_replace(chr(0x0B), "", $str); // vtab 11
$str = str_replace(chr(0x0D), "", $str); // \r 13
return $str;
}