I have an array as follows:
$data = array('John',22,'Peter',31,'Kevin',30,'Jessy',28.......'Revin',23);
This array will contains thousands of elements in the same format like name, age.
Now I need to insert this array in a table as follows by using PHP/MYSQL function.
--------------------
Id Name Age
--------------------
1 John 22
2 Peter 31
3 Kevin 30
Please note don't give options like loops or explode. Help is appreciated
fororforeachorwhileloop to do this. There is no way to operate with array with unknown way without a loop.