Login | Register | FAQ

Hello World PHP problem

+ Post a reply

3 posts Page 1 of 1

Hello World PHP problem

by shaunoneill52 » Tue Sep 20, 2016 11:48 am

Hi I am new to PHP and I am in need of some help. I loaded XAMPP successfully and started Apache and MySQL again without problems. After that the tutorial said to create a test file “test.php” to show that the “Hello World” worked on a browser – it did. But when I followed the tutorial example “my first page”
<title>My first PHP page</title>
echo "<h1>Hello World!</h1>";
This shows on the browser as Hello World!"; ?> and it also says that in the browser when you view source the PHP should be gone, which its not. So can someone tell me why the browser shows "; ?> at the end of Hello World and why the browser shows the PHP code?

User avatar


  • Posts: 1
  • Joined: Tue Sep 20, 2016 11:30 am

Re: Hello World PHP problem

by Farhin Qureshi » Fri Jan 13, 2017 1:16 pm

The code you are running is absolutely fine. I have tried the same and it work correctly.You must check that whether you made mistake at some where in the file or not.
User avatar

Farhin Qureshi

  • Posts: 45
  • Joined: Tue Jan 03, 2017 11:33 am
Farhin Qureshi
.NET Developer

Re: Hello World PHP problem

by nanoverso » Sat Jan 14, 2017 4:20 pm

Looks very likely something has been typed wrong, check your source.
User avatar


  • Posts: 254
  • Joined: Sat May 10, 2014 12:08 am
  • Location: Brazil

+ Post a reply

Page 1 of 1