Re: Spacing between $row["City"],$row["State"]
| From: | Philip Olson | Date: | Tue, 27 Mar 2001 20:14:33 +0000 |
| Subject: | Re: Spacing between $row["City"],$row["State"] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45777@lists.php.net to get a copy of this message | ||
Hi Mike,
Try this little test :
<?php
// Our array :
$row = array('city' => 'Seattle', 'state' =>
'Washington');
// Can do in PHP4 :
print "{$row['city']} {$row['state']}";
// Can do anytime :
print $row['city'] . ' ' . $row['state'];
?>
Not sure when "{$array['index']}" came about exactly but iirc it's not
allowed in PHP3. Concatenating your strings is always available and
works wonderfully.
Regards,
Philip
On Tue, 27 Mar 2001, Mike Mike wrote:
> Hello,
> Is there a way to get spacing between
> $row["City"],$row["State"] in the html output?
> I've tried echo "$row["City"], nbsp; $row["State"]";
> and a bunch of other things and get Parse error: parse
> error, expecting
STRING' or NUM_STRING' or
> `'$'' .
>
> The way I want the output is as follows:
> Duluth MN but I get DuluthMN
> Thank you
> --Mike
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/?.refer=text
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>