计算发送的文件

I have an multiple input sending files and I need guard this images with another name inside my folder called 'home'; So the pictures filing with the name home1.jpg, home2.jpg, etc

So, here is my code:

$file = $_FILES['Filedata'];
$filename_home = "";

$img_array = array($filename);

foreach($img_array as $key=>$value){
$filename_home.="home".$key.".jpg";
}

But this doesn't producing the result. Any help, will be appreciate

Where does $filename come from? It looks like you want to use $file instead.