note 22414 added to function.str-pad

From: Date: Mon, 17 Jun 2002 16:38:14 +0000
Subject: note 22414 added to function.str-pad
Groups: php.notes 
Request: Send a blank email to php-notes+get-31946@lists.php.net to get a copy of this message
Another solution to no_email@php.net's problem would be to simply multiply the padding string by 6. e.g. $string = str_pad($string, 10, " ", STR_PAD_BOTH); becomes $string = str_pad($string, 60, " ", STR_PAD_BOTH); which will avoid problems with the above solution, which will mess up text that has the * in it (or whichever character you're replacing) -- http://www.php.net/manual/en/function.str-pad.php http://master.php.net/manage/user-notes.php?action=edit+22414 http://master.php.net/manage/user-notes.php?action=delete+22414 http://master.php.net/manage/user-notes.php?action=reject+22414

« previous php.notes (#31946) next »