I am sending array of images and some text from javascript ajax function to php file and i can read text parameters but i cannot read image file parameters in php code how can i do that? Javascript code '''
formdata.append("file",img[i]);
xhttp.send("itemname="+itemname+"&category="+category+"&color="+color+"&price="+price
+"&image="+formdata+"&brandname="+brandname+"&attributes="+attributes+"&smalldescp="+smalldesp
+"&longdescp="+largedescp+"&warentyyear="+warentyyr+"&warentydescp="+warentypolicydescp+"&length="+pkglen
+"&width="+pkgweight+"&height="+pkgheg);'''
Php Code '''
$itemname = $_POST["itemname"];
$category = $_POST["category"];
$color = $_POST["color"];
$price = $_POST["price"];
$image =$_POST["image"];
$brandname = $_POST["brandname"];
$attributes = $_POST["attributes"];
$smalldescp = $_POST["smalldescp"];
$longdescp = $_POST["longdescp"];
$warentyyear = $_POST["warentyyear"];
$warentydescp = $_POST["warentydescp"];
$length = $_POST["length"];
$width = $_POST["width"];
$height = $_POST["height"];
echo json_encode($image->$_FILES['file']['name'][0]);
'''