note 54618 deleted from function.substr by bobby

From: Date: Thu, 14 Sep 2006 17:37:35 +0000
Subject: note 54618 deleted from function.substr by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-117181@lists.php.net to get a copy of this message
Note Submitter: jeroen at jscwebdesign dot nl ---- javazz at gmail dot com: Would it be much easier if instead of <?php while (substr ($path, -1) != '/'){ $path = substr( $path, 0, -1); } ?> you used <?php $path = substr($path, strrpos($path, '/') + 1, strlen($path)); ?>

« previous php.notes (#117181) next »