note 24600 added to function.str-pad

From: Date: Thu, 22 Aug 2002 17:53:41 +0000
Subject: note 24600 added to function.str-pad
Groups: php.notes 
Request: Send a blank email to php-notes+get-35369@lists.php.net to get a copy of this message
Why not just use a space[' '] instead of a character that COULD be inside the string, and risk messing it up? Example: $string = 'test'; $string = str_pad($string, 10, " ", STR_PAD_BOTH); // $string now equals ' test' $string = str_replace(" ", " ", $string); -- http://www.php.net/manual/en/function.str-pad.php http://master.php.net/manage/user-notes.php?action=edit+24600 http://master.php.net/manage/user-notes.php?action=delete+24600 http://master.php.net/manage/user-notes.php?action=reject+24600

« previous php.notes (#35369) next »