I have a simple PHP page and for some reason when I visit it nothing appears what am I doing wrong? My code is below:
<?php
$hello = "Hello World!"
echo $hello;
?>
I have a simple PHP page and for some reason when I visit it nothing appears what am I doing wrong? My code is below:
<?php
$hello = "Hello World!"
echo $hello;
?>
 
    
    Your problem is that you forgot the semilcolon after you created the variable $hello. If you are not getting an error display you might have error reporting turned off you can turn it on in either your php.ini file or by putting ini_set("display_errors", TRUE); as the first line of code after you open the <?php tag
This should do the trick
<?php
$hello = "Hello World!";
echo $hello;
?>
 
    
    set into your php.ini
ini_set("display_errors", TRUE);
and modiffy your code with
<?php $hello = "Hello World!"; echo $hello; ?>
 
    
    You don't end line with ;!
<?php
$hello = "Hello World!";
echo $hello;
 
    
    you did a mistake and your mistake is you don't give ";" after your second line

 
    
    <?php
$hello = "Hello World!"; // you forget to give ";" at the end off this line
echo $hello;  
?>
