Sr. PHP Programmer Question:
Download Questions PDF

How to create an array of a group of items inside an HTML form?

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 Senior PHP Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
Can you create a class in PHP?How will you create objects in PHP?