note 38445 added to function.explode
| From: | nanddam at zonnet dot nl | Date: | Sun, 21 Dec 2003 19:07:23 +0000 |
| Subject: | note 38445 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62301@lists.php.net to get a copy of this message | ||
Use explode to get the name(s) of the directorie(s) you're in
or make static links.
<?php
$script_name_array = explode("/", trim($_SERVER['SCRIPT_NAME']));
$ii = count($script_name_array)-1;
for($i=$ii;$i>0;$i--){
print(" $i -- ".$script_name_array[$i]."<br>");
}
?>
nand . nl
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38445
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38445&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38445&report=yes
Search -- http://master.php.net/manage/user-notes.php