note 55961 deleted from function.fgetcsv by victor

From: Date: Fri, 19 Aug 2005 04:27:44 +0000
Subject: note 55961 deleted from function.fgetcsv by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-93871@lists.php.net to get a copy of this message
Note Submitter: romacknatividad at yahoo dot com ---- // // stripWhitespaces // // Removes unnecessary whitespace from the string // because sometimes there are whitespaces between the characters // // params: // $str - The string to clean up // // returns: // clean string, free from w h i t e s p a c e s // function stripWhitespace($str){ // str_replace($searchStr, $replaceWithStr, $targetString) $str = str_replace("\0", "", $str); // NUL 0 $str = str_replace("\9", "", $str); // \t 9 $str = str_replace("\0A", "", $str); // \n 10 $str = str_replace("\0B", "", $str); // vtab 11 $str = str_replace("\0D", "", $str); // \r 13 return $str; }

« previous php.notes (#93871) next »