...

View Full Version : strange problem



xiaodao
02-18-2006, 05:20 AM
i got this for my array


Array ( [0] => 1.00 [1] => [2] => 1.00 )

however
when i do


for($i=0;$i<count($ppart);$i++){
if(empty($ppart[$i])){
echo "<br/>";
}else{
echo "\$".$ppart[$i]."<br/>";
}
}

The output continuesly to have "$" for $ppart[1] instead of "<br/>"
where is the problem
thanks

fci
02-18-2006, 05:50 AM
these are what you are trying to match:

"" (an empty string)
0 (0 as an integer)
"0" (0 as a string)
NULL
FALSE
array() (an empty array)
var $var;

if you run this, what do you get:

var_dump($ppart[1]);

xiaodao
02-18-2006, 06:08 AM
string(1) " "
thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum