Re: concatenating with "." or ","

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux