> I think perhaps ++$imagenum would be more appropriate than $imagenum++.
> I can't see any purpose in post-incrementing the value here.
> But I am still a newbie to PHP.
It makes absolutely no difference in the current context, it is not getting
assigned to anything bar iteself so the end result is the same.