foreach ($img as $imaj) {
if(is_uploaded_file($imaj)) {
echo $imaj['name'];
}
}