RE: [PHP] Ereg question

From: Date: Mon, 31 Mar 2003 03:20:19 +0000
Subject: RE: [PHP] Ereg question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141668@lists.php.net to get a copy of this message
> I thought trim only stripped white space.....?. $formsave['dob'] is a > session variable. I have also found now that leading 0's are also being > stripped. > > foreach($HTTP_POST_VARS as $varname => $value) > $formsave[$varname] = trim($value, 50); > > If it's not there then the whole script fails. Why do you have the 50 there in the trim() function? That's what's causing your problems. You're removing all fives and zeros from the beginning and end of your string, along with any white space. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#141668) next »