Re: concatenating with "." or ","
| From: | Thiago Melo de Paula | Date: | Mon, 25 Aug 2008 13:48:40 +0000 |
| Subject: | Re: concatenating with "." or "," | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278668@lists.php.net to get a copy of this message | ||
Govinda,
please, consider the following code:
<?php
$brandA = 'Porshe';
$brandB = 'Jaguar';
$testA = $branA . $brandB; //testA will have the value PorsheJaguar
$testB = $branA , $brandB; //Returns a Parse error: syntax error, unexpected
',' in /test.php on line 7
?>
With that, you can see that the comma isn't a concatenation symbol as the
period.
When you use it with echo, you're actually passing more than one argument to
the echo construct (why construct and not function? please, refer to
http://us.php.net/manual/en/function.echo.php
to get more details).
My 2 cents on this great list.
Regards from Brazil.
Thiago Melo de Paula
On Mon, Aug 25, 2008 at 1:27 AM, Govinda wrote:
> easy to find our about concatenating with "." in the docs...
> but not so with ","
>
> what is the difference?
>