Login | Register | FAQ
Anonymous

php is not working

+ Post a reply

3 posts Page 1 of 1


php is not working

by nikhil » Tue Jun 26, 2012 8:20 am

i've installed xampp in my system. whenever i see my php file in browser it doesn't show proper output. for example if the code is this:
<html>
<body>

<?php
echo<p>"Hello World"</p>;
?>

</body>
</html>
my output in the browser will be Hello World";?> it is typing everything after the double coats. what's the problem...????
User avatar

nikhil

  • Posts: 1
  • Joined: Tue Jun 26, 2012 8:09 am

Re: php is not working

by zakariadza » Tue Jun 26, 2012 10:44 am

Hello,
The correct syntax is: <?php echo "<p>Hello World!</p>"; ?>
HTML tags are text, they have to be written inside the double quotes.

Last edited by zakariadza on Fri Jun 29, 2012 9:30 pm, edited 1 time in total.

User avatar

zakariadza

  • Posts: 24
  • Joined: Wed Oct 12, 2011 9:44 am

Re: php is not working

by XainPro » Wed Jun 27, 2012 5:34 am

Did you saved your page as .PHP extension ?
User avatar

XainPro

  • Posts: 3669
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1