PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hopefully someone will be able to give me a hand. I'm developing my first theme for drupal and got stuck trying to add some php to dynamically change an image in a div according to the page's title. Drupal by default will create a variable called $title which is a string with the page's title. So I want to check: If $title is title1, use image1_png. The code I've created is:
what is the function htmlspecialentities() for? did you check the output?
the easiest way is to put the title in a variable, output the variable inside the title tag then use the same variable as the filename of the image or something.