prisskreative
8/20/2014 - 7:36 PM

PHP variables

PHP variables

<?php echo "hello word" ?>



/* php variables store data and start with $  ( $_ | $abc | $abc-123 )
   finish each statement with ;

   change one time change everywhere*/

<?php 
  
  $name = "Pris"; 
  $location = "Miami";
  $full_name = "Priscilla";
  $name = $full_name;

?>

// to recalling the variable replace priss with the variable 


<div>
  <h1>Mike</h1>
  <p>fgfh dfhddhfd  hfdhfd <?php echo $name ?> kfhkg</p>
</div>

<div>
  <h1><?php echo $name ?></h1>
  <p>fgfh dfhddhfd  hfdhfd <?php echo $name ?> kfhkg</p>
</div>


<div>
  <h1>Miami</h1>
</div>

<div>
  <h1><?php echo $location ?></h1>
</div>