note 38445 deleted from function.explode by bjori
| From: | bjori@php.net | Date: | Mon, 25 Sep 2006 08:13:00 +0000 |
| Subject: | note 38445 deleted from function.explode by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-117605@lists.php.net to get a copy of this message | ||
Note Submitter: nanddam at zonnet dot nl
----
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