I have a website using both HTML and PHP. To control the layout of the pages I've used css and a container table, being 100% in height, so that the copyright bar and links are always positioned at the bottom of the page. This works fine in the HTML pages, but I can't get it to work with the PHP.
Nope, there should be no difference at all. Can you post the PHP for the footer area or the table? I guess my question is, what are you using PHP for? Maybe the problem lies there. I've looked at your css file and there doesn't seem to be a problem with that.
I've just tried giving the footer an absolute position in css but that didn't work either. I also tried relative, no joy. I'm starting to pull my hair out here.
How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?
I actually bought the php script and have had to make a load of changes already, it was a bit of a mess. Unfortunately I don't know enough about PHP to totally fix it up.
How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?
Ok... well, is there a script that is creating all those variables on the same page as what you're displaying the links in? Otherwise, you're attempting to use global variables, which are not turned on by default in 4.3.2 (your version).
Ok, so they're not global vars. Everything is created within the file. Have you tried removing the quotes from the echos to see if that makes any difference? (I don't think it will, but that is still going to give you incorrect output).
All of the attributes in that tag override what's in the CSS. Everytime. All of that needs to be in the CSS (or not, if you don't want it.) If it's a stlying attribute, take it out of the HTML and put it into the appropriate spot in the CSS.
Problem solved. I forgot to valign the bar, it should have been <td valign="bottom">
techgnome, I've been using tables for years and it's hard to move away from them. I really should though. As for the table attributes and css, the site was thrown together rather quickly but I'll clean it up over the weekend.
Thanks for all the help, next time I'll pay more attention to what I'm doing.
How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?
Originally posted by CornedBee "$varname" and $varname are the same (though the first is slower), but '$varname' is not. Stuff inside '' isn't parsed, unlike stuff inside "".
Why doesn't it work the same?
How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?
That tells the PHP interpreter to print out the contents of $varname. That part should be easy enough to understand.
PHP Code:
echo "$varname";
This will tell the PHP interpreter to 'evaluate the contents of the double-quotes enclosed string and print this out'. Meaning it will print out any text in there, as well as evaluate (print the contents) of any variables contained therein.
PHP Code:
echo '$varname';
This however, tells the PHP interpreter that 'this is a string, print it out literally'.
So it would print the string $varname, not the contents of $varname.
If there is a way to solve your problems, there is no need to worry; if there is no way to solve your problems, there is no point to worry.