note 3130 deleted from count by ronabop

From: Date: Wed, 23 Aug 2000 06:25:22 +0000
Subject: note 3130 deleted from count by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-2948@lists.php.net to get a copy of this message
I ve got problems too with this stupid function! Just try this: <PRE> &lt;? $foo= "test"; $bar= ""; $fooarray= explode(",",$foo); $bararray= explode(",",$bar); //both of them are arrays// echo "$fooarray, $bararray<BR>n"; $numfoo = count($fooarray); $numbar= count($bararray); echo "numfoo: $numfoo, numbar: $numbar<BR>"; echo "foo[0]: $fooarray[0], bar[0]: $bararray[0]<BR>"; ?> Output: Array, Array numfoo: 1, numbar: 1 foo[0]: test, bar[0]: </PRE> Does anybody have an explonation of this error? I think the bararray should be empty so the count function should give a '0' length back, or is "" a character too in php3?

« previous php.notes (#2948) next »