Posted by Kimmo Laine on 06/20/05 19:45
"Desmond" <pd_otoole@hotmail.com> kirjoitti
viestissδ:1119284581.016755.16170@o13g2000cwo.googlegroups.com...
> Thanks I have seen some code on the internet and it uses a full stop
>
> $aaa . $bbb
That works too.
> and I have seen $zzz .= $vvvv is the .= rthe equivelent as +=
That also works.
Full stop is the concatenation operator, but php also has the quite unique
mechanism for inserting variables directly into strings.
$foo .= $bar;
is just short for
$foo = $foo . $bar; and they both concatenate the two variables.
But this works as well, just in a slightly different way:
$foo = "$foo$bar";
Variables inside double qoutes are replaced with their values. inside single
qoutes they'r not evaluated, but interpreted literally.
--
"I am pro death penalty. That way people learn
their lesson for the next time." -- Britney Spears
eternal.erectionN0@5P4Mgmail.com
Navigation:
[Reply to this message]
|