Save items from array on mysql with php
Hi i have one situation and i dont know what exactly i need to do.
This is a multiple file upload so im doing this
$files = $_POST["files-temp"];
this return ( iten1.jpg;iten2.jpg;iten3.jpg;) there is a semicolon on last iten
then i did
$array = preg_split('/;/',$files);
then i got
Array (  => iten1.jpg  => iten2.jpg  => iten3.jpg  => )
So there is a iten 4 that not exists, so i need to find a better way to do this then count and execut the query to save on mysql.
thanks for any help.