note 20885 added to function.eregi-replace

From: Date: Sat, 20 Apr 2002 09:24:57 +0000
Subject: note 20885 added to function.eregi-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-29596@lists.php.net to get a copy of this message
To trim off excess spaces and spaces at both ends of a string. You don't need to use eregi_replace(). You can simply use the function trim() like this: $a = " hello world "; $b = trim($a); echo $b; //will display 'hello world' -- http://www.php.net/manual/en/function.eregi-replace.php http://master.php.net/manage/user-notes.php?action=edit+20885 http://master.php.net/manage/user-notes.php?action=delete+20885 http://master.php.net/manage/user-notes.php?action=reject+20885

« previous php.notes (#29596) next »