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:
> 
<snip>

>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

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to