$count = 1; foreach ($resimler as $resim){ ... $big = $handle->file_new_name_body = 'biga_' . time() .' _ '.$count; $count++; }