how do i add a space between FirstName and LastName
echo "<div class='entry'>" . $row['FirstName'] , $row['LastName'] . "</div>";
05-13-2008, 03:24 PM
echo '<div class="entry">' . $row['FirstName'] . ' ' . $row['LastName'] . '</div>';
05-13-2008, 08:23 PM
jarv, RMcLeod's example will do what you need, but I wanted to help you understand what it means.
First off, he changed your statement quotes from double to single. For HTML tags, you need to use double quotes around the attributes. So:
echo '<div class="entry">'
echo "<div class='entry'>"
And using periods in between the parts of the echo statement is called concatenation. They basically glue parts of a statement together. So you can glue together the div HTML and the row variables and the space in between. Hope that helps some. Good luck! :)