0

how can i recive an array from an html get form?

i would receive the value of same checkbox, they have all the same name "es. object"

3 Answers 3

1

In your HTML form, use something like this.

<input type="checkbox" name="object[]" />
<input type="checkbox" name="object[]" />
<input type="checkbox" name="object[]" />

Then when you receive it in PHP the values of the checkboxes will be held in the array $object.

Sign up to request clarification or add additional context in comments.

Comments

1

Not sure I'm completely understanding your question but if you name your elements in the following way they will become ad array:

<input type="checkbox" name="lang[ ]" value="en">English<br />
<input type="checkbox" name="lang[ ]" value="fr">Français<br />
<input type="checkbox" name="lang[ ]" value="es">Español<br />

Comments

-1

PHP puts all data received from a get form into the array $_GET

Put this on your page

print_r($_GET);

misunderstood the question

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.