Receive array values

Asked

Viewed 55 times

1

How I receive the values of this checkbox?

<input type="checkbox" name="Item[<?php echo $IDCatalogo; ?>][<?php echo $IDItem; ?>]">

foreach( $_POST['Item'] as $key => $n ) {
                print "<p>".$n." | ".$key."</p>";
}
  • What is the need to create a multidimensional array for a checkbox?

1 answer

2

foreach( $_POST['Item']['IDCatalogo']['IDItem'] as $key => $n ) {
            print "<p>".$n." | ".$key."</p>";
}

I hope it helps you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.