Topic: What is this code and this operator? (Read 1407 times)
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8249
42481 credits Members referred : 3
« Reply #20 on: Sep 01, 2006, 10:55:39 AM »
Quote
I would use the code multiple times in the same page, but not with the same function call, will that still keep the same image from appearing?
I am not sure what you mean by that. If you keep this funtion, then the only thing needed to not display the same image is the existence of this line:
$showedPics = array();
in the beginning of the script. This is the array that the funtion globalizes to keep the images that have been displayed.
Quote
I will be using it with the script for my directory. Can this be easily saved as a separate file and then called from the template file?
Of course. Just save the file, and then include it from every page you want to use it.
Quote
I opted not to take the php class at the local community college, with the directory, I'm now sorry I didn't. I could probably learn it from a book, but the structure of a class makes it easier.
Don't worry you are in the webdigity university now
BTW I learned php from the web. Never had the chance to have a teacher on this language, but still I know a lot
I've been trying to figure out how to include the new file and make the function call and failing miserably.
The page where I use this is made up of 3 template files: header, index and footer.
Where header has the beginning of the html code and the info to display the top of the page, index has the main content of the page, and footer has the footer and end of the html file.
Where do I put the include statement? How do I make the include statement? I've tried several variations and all of them have either displayed the header only with an error message or done nothing.