I'm vaguely familiar with the fundamentals of 'programming' in general, but best to just call myself a complete noob at this point in time as it's pretty close to knowing nothing
Here's my question and it's very simple I'm sure:
Code: Select all
<?php $title = "My first HTML page with PHP embedded!";?>
<html>
<head>
<title><?=$title?></title>
</head>
<body>
<?php
$author['first_name'] = "this";
$author['last_name'] = "person";
$author = $author['first_name'] . " " . $author['last_name'];
$realauthor['first_name'] = "THAT";
$realauthor = $realauthor['first_name'] . " " . $author['last_name'];
echo "<h1>Hello World!</h1>\n";
echo "<p>The creator of this script is NOT $author, it's actually $realauthor !<br>\n";
?>
</body>
</html>The result is:
"Hello World!
The creator of this script is NOT this person, it's actually THAT t ! "
My question is--- WHY is the second last name ending up as "t" instead of "person" ?
I'd still like to know what is happening here, and where exactly that lowercase 't' is coming from... also, why doesn't this work?
Thanks!