implode explode in php -


this code-

$row=mysql_fetch_array($sql1);    echo $days= $row['attending_days'];   echo $days1 = explode($days',');   echo count($days1); 

it show me 1 value

use this

while($row=mysql_fetch_array($sql1)){    $days= $row['attending_days'];    $days1 = explode(',' , trim($days));    echo count($days1); } 

why using echo lines?


Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -