Forum Moderators: coopster
Your syntax is correct and should work as written. Can you please be a little more specific in terms of what your problem is?
Thanks
Firstly, try setting your error reporting level to E_ALL to help out with debugging. Its probably a case of you missing the [] operators as mentioned by winglian.
You can test if your array is an array by using is_array() [uk2.php.net]
if (is_array($_POST['checkboxes']))
{
// proceed
}
else
{
//uh oh, somethings wrong
}
dc
You could convert the format of each value like this before comparing the strings.
foreach ($_POST[delete] as $key => $value)
$_POST[delete][$key] = sprintf("%02d", $value);
Then for the comparison.
in_array("new", $_POST['delete']);
Please note: Untested code but i hope this helps.
Del