Hello,
Is there a special way to pass arrays into functions? As I get "Missing argument 4 for getimage()"
$retVal is the array.
//This fucntion works out what the next/prev images are.
function getImage($direction, $count, $current, $imgArray){
if ($direction == "prev"){
$image = --$current;
if ($image <= 2) {
$image = 2;
}
if (!$blah = (isImage($imgArray["$image"]))){
$image = --$current;
}
}
if ($direction == "next"){
$image = ++$current;
if ($image > $count){
$image = $count;
}
if (!$blah = (isImage($imgArray["$image"]))){
$image = ++$current;
}
}
return $image;
}
and this is how I am calling the function:
$no = getImage('prev', count($retVal), $page, $retVal);
Thanks in advance,
Mike