hi, im having an error(Warning: Invalid argument supplied for foreach()) regarding foreach function. im a bit confused because it runs well on my localhost but not on the live web server.
please help me out how to fixed this. here is my code:
foreach ($data as $key => $row) {
$day[$key] = $row['day'];
$event[$key] = $row['what'];
}
thanks in advance..
foreach() error..
Moderator: General Moderators
Hello.
What doesprint?
What does
Code: Select all
echo '<pre>data: ', var_dump($data), "</pre>\n";
foreach ($data as $key => $row) {
$day[$key] = $row['day'];
$event[$key] = $row['what'];
}foreach() error..
oh.. yeah, you right.
i miss looked that the array wasnt initialized properly coz the initillyzation triggers on the values in the URL string...
thanks.. just being pressured with the deadline
.. i just got it fixed.. thanks again..
thanks.. just being pressured with the deadline