Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Can you tell me what is wrong, code is from one PHP learning site and output
is wrong. Screenshot is here
This is the code:


Agent: So who do you think you are, anyhow?
<br />

// define variables
$name = "Neo";
$rank = "Anomaly";
$serialNumber = 1;

// print output
echo "Neo: I am <b>$name</b>, the <b>$rank</b>. You can call me by my serial
number, <b>$serialNumber</b>.";


Re: Question

PHP is a server language, you try run it locally.

1)install apache HTTP server -> /
2)Download and install PHP application -> /
3)Read manual
4)Have fun.

Re: Question


Quoted text here. Click to load it

Have a look at the HTML code in your browser - you'll see the exact code
including all the PHP statements as you've typed it. You have called the
file directly from disk (file://...) without a local web server, which
means that the PHP code is not interpreted. You have to use a HTTP URL.

If you don't have a web server running yet, install one of the various
packages containing Apache, PHP and MySQL (XAMPP for example).


Re: Question

Now works, thanks to all!!!

Quoted text here. Click to load it

Site Timeline