Forum Moderators: coopster

Message Too Old, No Replies

Testing php

error message

         

obeamma

7:06 pm on Dec 20, 2007 (gmt 0)

10+ Year Member



Hello

This might be an easy question but here goes:

I am very new to php. I am trying to test this code on my web server

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line<p>
<?php
echo “This is a PHP line”;
phpinfo();
?>
</body>
</html>

but I get this error message

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/urbi9365/public_html/test.php on line 8

I not sure what it means...If somebody could please explain the problem

Thanks

mooger35

7:27 pm on Dec 20, 2007 (gmt 0)

10+ Year Member



the error appears to be in the quotes used...

should be: echo "This is a PHP line";

coopster

7:28 pm on Dec 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, obeamma.

Perhaps those are not double quotation marks [php.net] in your echo statement?

Marcia

8:04 pm on Dec 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Got this working.

<p>This is an HTML line<p>
<?php
echo "This is a PHP line";
echo phpinfo();
?>

obeamma

12:40 am on Dec 21, 2007 (gmt 0)

10+ Year Member



Thank you so much everybody