How do I remove and view the last element of an array?
<?php
$values = array("I","Like","Sentences","That","Don't","Finish");
$discard = array_pop($values);
echo "Bye bye to $discard...\n\n";
$sentence = implode(" ",$values);
echo "$sentence";
?>
Which gives us the following output:
Bye bye to Finish...
I Like Sentences That Don't
Comment on this Question and Answer >>>
ASK A QUESTION
More arrays PHP Questions
what are php array functions?How do I check if a variable is of array type?
i have a site named profile.php where i want to replace the following: http://www.youtube.com/watch?v=yoXE031j8d0 into: i know i could use str_replace to replace into ... but i need to know the URL so i can check if it rea
How can I create an array of the letters of the alphabet?
How do I find if a value is already in an array or not?
