note 38279 added to function.array-pop

From: Date: Mon, 15 Dec 2003 08:36:03 +0000
Subject: note 38279 added to function.array-pop
Groups: php.notes 
Request: Send a blank email to php-notes+get-61968@lists.php.net to get a copy of this message
array_pop() can be usefull for fetching extentions of files, especially in cases where there might be more than one period in the filename. eg: <?php $filename = "textfile.txt.bak"; $tmp = explode(".", $filename); $ext = array_pop($tmp); print_r($ext); // Shows "bak" ?> ---- Manual Page -- http://www.php.net/manual/en/function.array-pop.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38279 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38279&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38279&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#61968) next »