Hi Group,
(Using php5 on apache1)
is there an equivalent of .= in PHP?
I'm making a program and I have lots of debug statements being added using
$debug = $debug . "some text"
and at the bottom of the HTML I have a <?php echo $debug ?>
I was just wondering, is there an equvalent to .= in PHP, so like
$debug .= "sometext", save me some typing :)
Also, another question
I tried making a function like so (just inline in the top of the php page):
<?php
$debug = "";
function addDebug($text) {
$debug = $debug . $text . "<br/>";
echo $debug; // returns correctly
}
addDebug("blah");
echo $debug; // not displayed properly
?>
but it doesn't seem to work. Since I'm using php5, I thought everything is
getting passed by reference now?
Thanks in advance,
Kelvin