Junior PHP Developer Question:

Download Job Interview Questions and Answers PDF

Tell us how to create an array of a group of items inside an HTML form?

Junior PHP Developer Interview Question
Junior PHP Developer Interview Question

Answer:

We can create input fields with same name for "name" attribute with squire bracket at the end of the name of the name attribute, It passes data as an array to PHP.

☛ For instance:
<input name="MyArray[]" />
<input name="MyArray[]" />
<input name="MyArray[]" />
<input name="MyArray[]" />

Download Junior PHP Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what is the use of rand() in php?Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?