0

Thanks in advance for your help, I am pretty sure you can solve my problem.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>title</title>
  </head>
  <body>
    <?php
      echo '<p>hello world</p>';
    ?>
  </body>
</html>

Previous Code example does display

hello world
'; ?>

instead of the expected

hello world

This was run local with xampp V3.2.2 on a win10 OS and Chrome browser. I hope I'm not the fiftieth person to ask this just because I couldn't google it correctly. Thanks for your help.

5
  • echo 2+3; what is the output ? Commented Dec 17, 2017 at 11:35
  • output is nothing. With: echo "<p>".2+3."</p>"; it's: ".2+3." "; ?> Commented Dec 17, 2017 at 12:39
  • it seems php doen't work at all.try reinstalling xampp.and are you sure that you are running php correctly ? Commented Dec 17, 2017 at 13:33
  • I am sort of sure that it's running correctly. I just installed xampp and relied on it running correct. I'll reinstall it and try to find the correct settings. So far you've helped me a lot. Didn't know xampp could be the problem. Commented Dec 17, 2017 at 14:32
  • 1
    Alright, I managed to get it working now thanks to you mentioning it must be xampp. The problem was that I started the it with a file:// url instead of //localhost. Solution: stackoverflow.com/questions/9406433/php-not-working-in-xampp Thank you very much. Commented Dec 17, 2017 at 14:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.