if ((isset($prev['photo_id']) && isnum($prev['photo_id'])) || (isset($next['photo_id']) && ISnUM($next['photo_id']))) { if (isset($prev)) { echo "