note 11590 added to explode

From: Date: Mon, 26 Feb 2001 15:43:50 +0000
Subject: note 11590 added to explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-11610@lists.php.net to get a copy of this message
A little obvious, but I'll save those interested the few seconds. To get only the last element of an explode function, you don't have to assign its count to anything. Simply use: $value = $array[count($array) - 1]; http://www.php.net/manual/en/function.explode.php

« previous php.notes (#11610) next »