If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
array_pop() function , Array में से last element remove है। और removed element को ही return करता है।
array_pop ( array $array );
array $array | required : $array Array variable है , जिसमे से value remove करनी है।
Return Value : removed element को ही return करता है।
अगर pass किया गया Array empty है तो , null return होगा।
File : php_array_pop.php
<?php
$stack = array("orange", "banana", "apple", "raspberry");
echo "Removed element : ". array_pop($stack);
echo "<br>";
print_r($stack);
?>
Removed element : raspberry Array ( [0] => orange [1] => banana [2] => apple )
Hi ! My name is Rahul Kumar Rajput. I'm a back end web developer and founder of learnhindituts.com. I live in Uttar Pradesh (UP), India and I love to talk about programming as well as writing technical tutorials and tips that can help to others.
Get connected with me. :) LinkedIn Twitter Instagram Facebook