Hi everyone, I am running into a problem which seems to be giving me a real headache. I have several different forms which some times they are array and sometimes they are not depending on the form. I would like to be able to insert the array into a database and echo out the user selection before submittal. overall I have over 41 forms.
Here is something I came up with pretty quick but is not doing what i want it to ?
$array1 = array();
$array2 = array();
if(is_array($_SESSION['material'])){
foreach($_SESSION['material'] as $_POST['material']){
$array1[] = $_POST['material'];
}
}
if(is_array($SESSION['pr_type'])){
foreach($SESSION['pr_type'] as $POST['pr_type']){
$array2[]= $POST['pr_type'];
}
}