Re: using . to concatenate strings ?

From: Date: Thu, 04 Dec 2003 08:55:20 +0000
Subject: Re: using . to concatenate strings ?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24121@lists.php.net to get a copy of this message
Arnaud Limbourg wrote:
i have a php question. What is the best way to go ? $str = 'text ' . $obj->myvar . ' extrat text'; or $str = "text {$obj->myvar} extrat text'; Does one have advantages over the other ?
I use sprintf() for most things. The 1st way is nicer I think. At least the parser has a little less work because of the \'. But that's only my tiny little humble opinion :-) -- Daniel Khan

« previous php.pear.dev (#24121) next »