foreach($this->galleryPhotoDBInitialArray as $initialArrayElement) {
$photoExists = false;
foreach($this->galleryPhotoDBFinalArray as $finalArrayElement) {
if($initialArrayElement == $finalArrayElement) {
$photoExists = true;
echo $initialArrayElement;
}
}
if(!$photoExists){
echo 'delete............................................';
echo $initialArrayElement;
}
}
I have the above code. I know the arrays have data as I can print_r() it and see the data. the Array data looks like this:
What do I need to do so I can access the $initialArrayElement value - I need to process this further but I get the PHP error 'array to string conversion error'...
thankyou very much :)
echo
an array, which gives that warning. Useprint_r()
orvar_dump()
instead.