note 38445 modified in function.explode by aidan
| From: | aidan@php.net | Date: | Thu, 01 Jul 2004 09:53:23 +0000 |
| Subject: | note 38445 modified in function.explode by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72248@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
--was--
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
http://php.net/manual/en/function.explode.php