Im having trouble trying to get this to work.
<?php
$_SESSION['age'] = 11
if($_SESSION['age'] < 14) {
echo "<h2>Your only $_SESSION['age']? Thats Young!</h2>";
}
?>
If you want to echo PHP variable inside echo function, you must as first break echo with ", then add a "merge char" ., then your variable and then again "merge char" and ".
Also don't forget to add semicolon to end of your line which contains definition of $_SESSION['age'].
Edit your code to:
<?php
$_SESSION['age'] = 11;
if($_SESSION['age'] < 14) {
echo "<h2>Your only ".$_SESSION['age']."? Thats Young!</h2>";
}
?>
; to end of your line with $_SESSION['age'] = 11 (edited in my code)