<?php $p = array( 1, 2, 3, 4); foreach ($p as $ID) { $arr_result = array(); //Create arr_result array # code that sets $arr_result to array(100, 200, 300, 400) $count = count($arr_result); //Count how many IDs there are if($count <= 1) { echo "Only one ID"; unset($GLOBALS['arr_result']); } if($count > 1) { foreach ($arr_result as $checkid) { #do stuff } $count = 0; $arr_result = null; $checkid = null; } ?>
You have javascript disabled. You will not be able to edit any code.