note 29701 deleted from function.basename by didou

From: Date: Mon, 14 Jun 2004 12:17:18 +0000
Subject: note 29701 deleted from function.basename by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71039@lists.php.net to get a copy of this message
Note Submitter: cpdm @ the eugene freenet(efn.org) ---- to answer the lots of dots problem: $path = "/blah/file.name.has.lots.of.dots.ext"; $extension = array_pop(explode('.', basename($path))); $therest = substr(basename($path), 0,"-" . (strlen($extension) + 1)); print "EXTENSION: $extension<br>"; print "THE REST: $therest"; --Christopher Maujean

« previous php.notes (#71039) next »