hi there. i'm trying to figure out how i would set up the following navigational coolness:
<div id="leftcol" >
<ul id="navlist">
<li><a href="index.php">About the Doc.</a></li>
<li><a href="ch01.php"><?php print info file target; ?></a></li>
<li><a href="ch02_writing-editing.php">Writing & Editing</a></li>
</ul>
</div>
i'm sure it can be done somehow-- but exactly what approach to take-- well, that's why i've come here of course!
i want it to read:
index
ch01
ch01_writing-editing
i'm okay w/ getting the file names, via this technique in general:
<?php
$process = $_SERVER['PHP_SELF'];
$patharray = pathinfo($process);
$thispage = rtrim($patharray['basename'], (".".$patharray['extension']));
echo $thispage;
echo "<pre><br />This is the \$patharray : ".$patharray."<br />";
print_r($patharray);
echo "</pre>";
?>
but it's the question of how to plug that [concept of data generation] into my nav. structure where it's flying just above my big fat head
maybe this whole pathinfo() bit isn't the way to go. it's not necessarily functional as much as it's just for Fun-tional. (to learn something)
what would you do with it?