foreach help

From: Date: Thu, 31 Jul 2003 01:50:58 +0000
Subject: foreach help
Groups: php.general 
Request: Send a blank email to php-general+get-157632@lists.php.net to get a copy of this message
Hi, I have a set of checkboxes (around 38) which will be sent to me via a post(eg: <input name="noPlatform" type="checkbox" id="noPlatform" value="1>)...if the checkbox is checked then session "noPlatform" should be created...AND only the checked ones should be registered all others should be unset. one way to do this would be to something like this: $noPlatform = (isset($_POST['noPlatform'])) ? 1 : 0; then set the session or via using a if and isset... but that would mean doing that for the whole 38 fields...I think I have seen something like this done via a loop (for, while or foreach or a combination) but cant find it in my old mail or the archive. Thanks in advance, -Ryan

« previous php.general (#157632) next »