Jump to content

help a newbie out


bloodmage2

Recommended Posts

hello, i've decided to learn php recently, and i've found tutorials on the internet. i have notepad ++ and i have a problem. whenever i run the file, instead of doing what the tutorial claims it to do, it simply prints out on the browser the code, for example,

<?php

function myfunc($argument)

{

    echo $argument + 10;

}

$variable = 10;

echo "myfunc($variable) = " . myfunc($variable);

?>

would not print out the results, but print out what is above, sans the <?php .

i have no experaince, and i need help.

Link to comment
https://forums.phpfreaks.com/topic/174744-help-a-newbie-out/
Share on other sites

You need a webserver to host it on.

 

http://www.easyphp.org/index.php

 

You need to install that, put the php files in the www folder, then run the program, then go to http://127.0.0.1

 

PHP needs a webserver to run on, it doesn't work like HTML

Link to comment
https://forums.phpfreaks.com/topic/174744-help-a-newbie-out/#findComment-920904
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.