note 55961 added to function.fgetcsv
| From: | romacknatividad at yahoo dot com | Date: | Fri, 19 Aug 2005 03:02:31 +0000 |
| Subject: | note 55961 added to function.fgetcsv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-93868@lists.php.net to get a copy of this message | ||
//
// 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;
}
----
Manual Page -- http://www.php.net/manual/en/function.fgetcsv.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55961
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55961&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55961&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55961&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55961&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55961&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55961&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55961&report=yes
Search -- http://master.php.net/manage/user-notes.php