Here's my PHP code:
<html>
<Head>
<?php $FirstName="Sergio";
$LastName="Tapia";
$firstNameCount=strlen($Firstname);
?>
</Head>
<body>
<h1>It works!</h1>
<?php echo("Why hello there Mr. ");
echo $FirstName . " " . $LastName;
echo "So, your name appears to have " . $firstNameCount . " letters." ?>
</body>
</html>
It always shows that my firstNameCount is 0, when it should be six. Any ideas what I'm doing wrong?
Also, please tell me how to format code so it's in the recommended way. Since I'm literally brand new to PHP I'm probably not formatting as the standards say I should.
Thanks.
Edit: Also what's the difference between echo "texthere" and echo("text here"). I just noticed I'm using both (which I probably shouldn't be). Which should I use?