I have been looking for some time the solution to eliminate my error message :
Warning: Invalid argument supplied for foreach() in...
Here is my code :
$data = $_POST;
if (count($data) > '1') {
var_dump($data);
foreach ($data as $k => $row) {
var_dump($row);
foreach ($row as $k2 => $img) {
echo $img;
}
}
Here's the result : (The result is good only the error message here is annoying)
array (size=2)
'image' =>
array (size=2)
0 => string '608' (length=3)
1 => string '610' (length=3)
'submit' => string 'Save' (length=11)
array (size=2)
0 => string '608' (length=3)
1 => string '610' (length=3)
608610
string 'Save' (length=11)
I tried to add a isset for $data, without success ..