If I have a table with columns called image1, image2, image3, etc and I pulled those in an object-oriented manner, like this:
$images->image1
$images->image2
$images->image3
etc.
Is there any way to process these in a loop? Something like:
for (i=1; i<count($images); $i++) {
$array[$i] = $images->image?
}
I realize the above won’t work, but was wondering if someone could tell me a way that will work. Thanks.
Pulling them from the DB in an array might be a better option, but you can do it with objects by using variable variables: