<?php
$bob="bob";
if ($bob=="bob") { $john="john";}
echo $john . "\n";
?>
Does what you expect. Those lil' things are "curly braces", as the manual will tell you if you read it as Brett suggests.
And I'll go one farther: you should really read up on control structures, as that is what an "if clause" really is called; besides, you'll have less questions in the future as regards "else", "elseif", "while", "for", "foreach", etc., etc.... 😉