starting to learn PHP

Hi,

I am starting to learn PHP and posted a test file on a sub domain I created. This is the code but nothing happens

[php]

My first HTML document

< ?php echo “ < p > If you see this then we did it right! < /p > ”; ? > [/php]

Please help

Can you define “nothing happens?”

On closer inspection. You like whitespace to much. It is <?php ?> not < ?php and ? >

You should be have text : If you see this then we did it right!

You have this code in .php file ?

Several issues could cause the problem.

One thing is PHP itself. Does your server have it installed and running?
(If not, you can activate it on your server’s control panel.)

Did your name the file with the PHP extension? (NOT index.html, but, index.php)
(HTML files are not passed thru the PHP parser, so they will never be executed.)

Sponsor our Newsletter | Privacy Policy | Terms of Service