נקרא למערך ניצן:
PHP קוד:
<?php
$nitsan = array(); // lets imagine that this variables hosts our array..
$a = true;
for($i=0; $i<sizeof($nitsan)-1 && $a === true;$i++)
if (sizeof($nitsan[$i]) != sizeof($nitsan[$i+1]) $a = false; // sizeof() validation
for ($i=0; $a === true && $i < sizeof($nitsan["type"]); $i++)
mysql_query("INSERT INTO `tbl` VALUES ('{$nitsan["type"][$i]}', '{$nitsan["title"][$i]}', '{$nitsan["order"][$i]}')"); // insertion query
// FAST EDIT: The above code would work in case that the indexes of the array are a series of integers, in other cases it would be better to use: