How do I add to the end of an array and know how large the array is?
$arrayname = "$value";
However, if you want to know how many entries are in the array once you've done so, then you can get at that value simply by using the array_push function, like so:
$values = array("I","Like","Sentences","That","Don't");
$newelement = array_push($values,"Finish");
echo "There are now $newelement elements in the array:\n";
This prints out the following to the screen:
There are now 6 elements in the array:
 => I
 => Like
 => Sentences
 => That
 => Don't
 => Finish
More arrays PHP Questionsto check if the value is an array
How can I reverse sort an array keeping the correlation between the index and value?
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
hi, i am querying the DB as follows: $result=mysql_query("SELECT name,items FROM mytable WHERE user_id='$id'"); now,i want to create an array to insert the values that are as a result of this query e'g let's say this is the resultant data: n
I am not interested in the values in the arrays, how can I discard them?