How do I remove and view the last element of an array?
$values = array("I","Like","Sentences","That","Don't","Finish");
$discard = array_pop($values);
echo "Bye bye to $discard...\n\n";
$sentence = implode(" ",$values);
Which gives us the following output:
Bye bye to Finish...
I Like Sentences That Don't
More arrays PHP QuestionsHow do I check if a variable is of array type?
How do I add to the beginning of an array and find the number of elements in it?
I'm shuffeling through numbers range(1, 10). Can I eval resulting random numbers and convert to appropriate text? 1 = username1, 2 = username2...etc?
I am not interested in the values in the arrays, how can I discard them?
what are php array functions?