I need some help. I need to insert the the value if its present inside the user input array using PHP and MySQL. I am explaining my table below.
db_images:
id image subcat_id
Here I need to insert into above table as the following json array value.
$subcat=array(array("id"=>63),array("id"=>64));
$imageArr=array(array("image"=>"abc.png","id"=>63));
Here I need to match both array if any value from $subcat
array is present inside the second (i.e-$imageArr
) array then the resepective image will insert into the table and if not present the the blank image value will insert with the respective subcat_id
. Please help.