I want to send an array from a function to another. This code is not displaying errors on the page but if i go the source code first error says "SCREAM: Error suppression ignored for" and then "Notice: Undefined offset: 0". Since this is the first time im trying to do something like this I cant figure out where is the problem so, hope yo guys can help me.
function Link($db,$url,$pos,$rows_affect){
for(){
$array[$line]=$url; // when i echo this i get 3 links
if($pos==$rows_affect-1){
$var_dump($array); // here its only showing the last value from the array
player($db,$array);
}
}
}
function player($db,$array){
for ($i = 0; $i < count($array); $i++) {
echo $array[$i];
}
}
$line
? Also, try to dovar_dump($array)
insideplayer
to see what it actually contains – Matthew Apr 28 at 21:58var_dump
statement? From the sounds of it, it seems like you're using an associative array and not a zero-indexed array, in which case Kolink's answer is probably what you want. – Matthew Apr 28 at 22:07