How do I add to the beginning of an array and find the number of elements in it?
$values = array(2,3,4,5,6,7,8,9,10);
$elements = array_unshift($values,1);
echo "Number of elements: $elements \n\n";
Here's the output:
Number of elements: 10
 => 1
 => 2
 => 3
 => 4
 => 5
 => 6
 => 7
 => 8
 => 9
 => 10
More arrays PHP Questionsim getting a Resource id #5 $rs_comp = mysql_query("select * from company where autoID='$row_settings[compid]'");
How can I loop through the members of an array?
How do I reverse the order of the elements in an array?
How do I return all the values in an array?
I have an array of numbers and many repeat, how to list all items in order of maximum occurence?