Re: prepending concatenating assignment operator

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

 



On Fri, Jul 24, 2009 at 8:53 PM, Daniel Kolbo<kolb0057@xxxxxxx> wrote:
> Hello,
>
> I know the appending concatenating assignment operator:
> $str_name = "Foobar";
> $str_name .= " Sr";
> echo $str_name;//Foobar Sr
>
> But is there a shortcut assignment operator for prepending concatenation?
>
> $str_name = "Foobar";
> //$str_name =. "Mr ";
> // i know this is not allowed, but is there some shorcut?
> $str_name = "Mr " . $str_name;
> echo $str_name;//Mr Foobar
>
> Just curious.
>
> Thanks,
> dK
> `

No, there is not a "prepend" concatenation operator.

http://www.php.net/manual/en/language.operators.string.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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