Jump to content

[SOLVED] Count the number of variable that is not empty


sungpeng

Recommended Posts

while($index<=1000)
  {
$arr =$_SESSION['hello'][$index];
echo count($arr); 
}

Check I need a function that will count the number of $arr that is not empty. If got 10 $arr that is not empty or = zero, display 10. The above code display 00000000100000010000. This is not I need.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.