guys i ve just installed php in my machine!!

i am getting parsing error resulting in a blank page!!

the code is as follows

<HTML>

<HEAD>

<TITLE>My first PHP program</TITLE>

</HEAD>
<BODY>
<?php
----->print(“Hello, cruel world"<BR><BR>\n”);
phpinfo();
?>
</BODY>
</HTML>

when running with the arrow part commented it is running properly and reading

Recommended Answers

All 4 Replies

Member Avatar for iamthwee

lucky for you dat's a simple problem.

It's just the syntax you can change.

<HTML>

<HEAD>

<TITLE>My first PHP program</TITLE>

</HEAD>
<BODY>
<?php

echo "Sup mo fo?";
echo "<br>";

phpinfo();
?>
</BODY>
</HTML>

lucky for you dat's a simple problem.

It's just the syntax you can change.

<HTML>
 
<HEAD>
 
<TITLE>My first PHP program</TITLE>
 
</HEAD>
<BODY>
<?php
 
echo "Sup mo fo?";
echo "<br>";
 
phpinfo();
?>
</BODY>
</HTML>

hey thanx dude for coming forard to help!!

but the problem is every single program in every books starts off with that same program!!! and it functions correctly!! so where is the mistake???

the problematic program is actually a cut and paste work from eboook!!

Member Avatar for iamthwee

hey thanx dude for coming forard to help!!

but the problem is every single program in every books starts off with that same program!!! and it functions correctly!! so where is the mistake???

the problematic program is actually a cut and paste work from eboook!!

I'd get a new book! I ain't seen that syntax before:

----->print(“Hello, cruel world"<BR><BR>\n”);

Normally you would use echo to print summat to the screen.

I'd get a new book! I ain't seen that syntax before:

----->print(“Hello, cruel world"<BR><BR>\n”);

Normally you would use echo to print summat to the screen.

well got the problem!!!

the problem is not with the print command!! it will work fine in php refer any ebook floating around in the web!!

the problem is with the double qoute which is differnt if pasted from ebook and when u type the double quote this is what led to the parsnig error!!!
other wise no problem!!!!

thank u again for coming forward to help bye......

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.