PHP doesn't understand numbers

Hi, I’m new here, but not so new to PHP (but still a beginner in a way).

I installed LAMP today on Ubuntu 10.04 and I’ve installed LAMP before, but this installation is a little weird. Everything works properly, but if I was to echo a number, nothing would happen.

Is anyone familiar with this problem and know how to fix it?

Thanks in advance!

Sorry for double posting, but if I was to do something like this:

<?php echo "My favorite number is 23"; ?>

This would output: “My favorite number is”

I’ve never experienced this type of problem before on any other server.

Apologies in advance for the useless post, but… I have never come across that problem before!

Make sure that this is not being hidden because it’s in a fixed-width element or anything like that. You could also try using ’ instead of " and see if that makes a difference. Another (very strange) test is to assign that number to a variable - i.e.


<?php $num = 23; echo "my favourite number is ".$num; ?>


Let me know how you get on with this - I am very intrigued.

Sponsor our Newsletter | Privacy Policy | Terms of Service