+ 4
Why its not working??
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <script language="php"> <?php echo "hello world"; ?> </script> </body> </html>
8 Answers
+ 7
PHP must be execute from a server and not your web browser. Additionaly <script> is not make to declare PHP, you have to remove them.
+ 3
@geoffrey so this will not work in playground in web section?
+ 3
no only under php not web. php is server side so if your page isnt php it wont execute the code. There's nothing wrong with your code
+ 2
It wouldn'tâ work on Playground. Setup XAMPP or WAMP
+ 2
OK thnx guys ...
+ 1
it's php error..
so run this code on server
+ 1
sheet :(
0
PHP must be execute from a server and not your web browser. Additionaly <script> is not make to declare PHP, you have to remove them.