"You Are Here" script.
Posted: Thu Jul 10, 2003 3:54 pm
I'm new to PHP, so my knowledge of it is limited. However, I'm fluent in JavaScript, so I should be able to grasp parallel functions between the two languages.
I'm trying to write a simple "you are here" script in PHP based on the directories listed in the URL. I'd like to be able to optionally give directories different "showing" names than the actual name of the directory.
I wrote one in JavaScript, but it uses innerHTML, and some browsers (not naming any names, Opera) don't support it as well as I'd like (or at all).
It'd be cool if someone had one lying around that I could use. If not, does anyone have a link that I could check out some source code?
Other than that, I'd be willing to write my own, but I'd need to know some parallel functions in PHP for JavaScript.
- String.indexOf();
- String.split();
- single-dimensional array syntax
I think I'd fare pretty well if someone could give me a "boost" on these.
Thanks.
p.s. Also, I need to know how to include a separate PHP script file as you would with .js files.
I'm trying to write a simple "you are here" script in PHP based on the directories listed in the URL. I'd like to be able to optionally give directories different "showing" names than the actual name of the directory.
I wrote one in JavaScript, but it uses innerHTML, and some browsers (not naming any names, Opera) don't support it as well as I'd like (or at all).
It'd be cool if someone had one lying around that I could use. If not, does anyone have a link that I could check out some source code?
Other than that, I'd be willing to write my own, but I'd need to know some parallel functions in PHP for JavaScript.
- String.indexOf();
- String.split();
- single-dimensional array syntax
I think I'd fare pretty well if someone could give me a "boost" on these.
Thanks.
p.s. Also, I need to know how to include a separate PHP script file as you would with .js files.