In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Lmlweb) wrote:

> if I use within my html codes:
> <?php echo $fname $lname; ?>, I get an error message telling me:

>how do I best combine the two (other than having to create two separate 
><?php..?> codes in the HTML)?

Any of these work:

<?php echo $fname . $lname; ?> //concatenation operator

<?php echo $fname , $lname; ?> //echo takes variable # of args

<?php echo "$fname $lname"; ?> //double-quotes interpolate

<?php echo $fname; echo ' '; echo $lname; ?> //multiple statements

<?php echo<<<EOF
$fname $lname
EOF; ?> //heredocs interpolate too


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to