How can I create an array of numbers easily?
$myarray = array(1,2,3,4,5,6,7);
Or you can do it the easy way, using the range function, which you simply pass the first and last value in the consecutive range. So this is equivalent to the above code:
$myarray = range(1,7);
... and when you want an array containing the numbers 1 to a 1,000 - then you'll be glad you learned about this function!
More arrays PHP QuestionsHow do I add to the beginning of an array and find the number of elements in it?
reverse an array
I tried to query a table and retrieve some data, then I email them to an indivisual person with different data. However, I am only to send the 1st email, but not 2nd email. My query seem that not able to pass the 1st data found and pass it for 2nd time
How can I sort a multi-dimensional array?
I want to invert my array, can I do this?