note 32768 added to language.types.string

From: Date: Fri, 06 Jun 2003 07:58:29 +0000
Subject: note 32768 added to language.types.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-49845@lists.php.net to get a copy of this message
This one took me a while to sort out: $foo = "1.5\n"; $bar = "1.5"; printf ("%6.2f, %6.2f ", $foo*2, $bar*2); >> 2.0, 3.0 So apparently string conversion is messed up by NULL, an obvious solution in case you happen to have a NULL terminated string is: $foo = rtrim ($foo); ---- Manual Page -- http://www.php.net/manual/en/language.types.string.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32768 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32768&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32768&report=yes

« previous php.notes (#49845) next »