Try
echo "
unlink('uploads/'.$album_id.'/'.$image_id.'.'.$image_ext);
unlink('uploads/thumbs/'.$album_id.'/'.$image_id.'.'.$image_ext);
";
and see if it shows you the correct syntax. Maybe you're still having an incorrect value or a missing slash or something.
Please paste your results here if this doesn't help you further.