PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
if($photos_uploaded['size'][$counter] > 0)
{
if(!array_key_exists($photos_uploaded['type'][$counter], $known_photo_types))
{
echo 'File '.($counter+1).' is not a photo!<br />';
When its false I get error: Notice: Undefined offset:
for this to work without warnings it doesn't matter wether $photos_uploaded does not exist or has no element size or [$counter]. It even works if $photos_uploaded is an integer (not an array). But $counter has to exist or you will get a warning.