$result=mysql_query("SELECT folder FROM messages WHERE id IN(". implode(', ', $_POST['msg_id']).")") or die ('Error');
while ($row=mysql_fetch_assoc($result)) {
$folder = $row['folder'];
echo "$folder<br>";
if ($folder == '0') echo "zero folder"; else echo "not zero folder";
}
echo "finished";
Problem: this script prints all $folder values and word "finished". For some reason it ignores the line
if ($folder == '0') echo "zero folder"; else echo "not zero folder";
and there is no output at all - not "zero folder" and "not zero folder".
Why?
Thanks.