I would like to post data in checkboxes, as like
<?php foreach($data as $foreignid => $id): ?>
<input type="checkbox"
name="photoids[<?php echo $foreignid; ?>]"
value="<?php echo $id;?>"
/>
If I go this way only one key-value pair remains in my $_POST array.
If I leave the photoids[] array empty, (not echoing out the $foreignid) all of the key-value pairs remains in $_POST array, but then i don't have access to the $foreignid variable which that I need in my code.
What is the best workaround for this problem?