Re: array limits in echo function?
| From: | CC Zona | Date: | Tue, 09 Apr 2002 05:20:02 +0000 |
| Subject: | Re: array limits in echo function? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92175@lists.php.net to get a copy of this message | ||
In article <20020409042619.40674.qmail@pb1.pair.com>,
junkit@lmlweb.com (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