joined:June 26, 2003
I have a few websites that I have built myself over the years and use PHP on many pages. What I use is really simple stuff like includes, etc.
One a couple of sites I 'store' information that I can echo in navigation menus and multiple places on a page. At the top of each page, I have something like this:
<?php $name = "some name";
$image = "some-image.jpg";
$link = "some link";
$location = "some location";
$num ="6 digit number";
My current problem is that I don't always have the '6 digit number' added to the page -- I have to match a list and add them one at a time. So in those cases, I would like to be able to have an 'echo' or some code that will look for the number, and if '$num' does not exist, then it would use '$image'.
I have about 1500 pages and I'm slowly adding the '$num' to each, but in the interim I would like an option, as the '$num' is a better resource than '$image'.
And one of the 2 images need to load when/after a PHP include adds a navigation menu. Is that a problem?