note 20258 added to function.str-pad

From: Date: Wed, 27 Mar 2002 22:21:08 +0000
Subject: note 20258 added to function.str-pad
Groups: php.notes 
Request: Send a blank email to php-notes+get-28300@lists.php.net to get a copy of this message
For some reason that totally eludes me, <? $input = "test"; str_pad($input, 10); echo $input; ?> doesn't work (the $input string echo's perfectly, but isn't padded) but, <? $input = "test"; $output = str_pad($input, 10); echo $output; ?> does work. I use php version 4.1.2 and I can't see why this piece of code, which came natural, and seems pretty normal to me, doesn't work. -- http://www.php.net/manual/en/function.str-pad.php http://master.php.net/manage/user-notes.php?action=edit+20258 http://master.php.net/manage/user-notes.php?action=delete+20258 http://master.php.net/manage/user-notes.php?action=reject+20258

« previous php.notes (#28300) next »