note 90263 deleted from function.basename by googleguy

From: Date: Sat, 12 Jan 2013 09:47:04 +0000
Subject: note 90263 deleted from function.basename by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-192964@lists.php.net to get a copy of this message
Note Submitter: leelu123 at gmail dot com ---- To get the inner most dir of a path <?php $DirPath = '/var/www/fruits/apple/'; //To get the innermost dir 'apple' $InnermostDir = basename(rtrim($DirPath, '/')); echo $InnermostDir; //will display 'apple' ?>

« previous php.notes (#192964) next »