note 38933 added to function.explode

From: Date: Mon, 12 Jan 2004 19:52:51 +0000
Subject: note 38933 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-63364@lists.php.net to get a copy of this message
Here is a very usefull, little and easy script to explode a file in its name and its extension... <? $file = "pic.of.the.day.jpeg"; $file_rev = strrev($file); $file_array = explode(".", $file_rev, 2); $file_name = strrev($file_array[1]); $file_ext = strrev($file_array[0]); print "".$file_name.".".$file_ext.""; ?> ---- Manual Page -- http://www.php.net/manual/en/function.explode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38933 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38933&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38933&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63364) next »