Welcome Guest, Not a member yet? Register   Sign In
syntax question
#7

[eluser]jedd[/eluser]
[quote author="babyboss" date="1245250899"]what is the difference between
$variable .= form_input('name', '');
[/quote]

Since we're all having a go .. the operator-in-front-of-the-equals-sign works with many of the arithmetic operators too (+ / - are more often used).

These two code bites do the same thing:
Code:
$variable = "bob";
$variable .= form_input('name', '');

Code:
$variable = "bob";
$variable = $variable  .  form_input('name', '');

I'm pretty sure they talk about this in the [url="http://www.php.net/manual/en/language.operators.string.php"]PHP manual[/url] somewhere ...


Messages In This Thread
syntax question - by El Forum - 06-17-2009, 04:01 AM
syntax question - by El Forum - 06-17-2009, 04:03 AM
syntax question - by El Forum - 06-17-2009, 04:05 AM
syntax question - by El Forum - 06-17-2009, 04:25 AM
syntax question - by El Forum - 06-17-2009, 04:29 AM
syntax question - by El Forum - 06-17-2009, 04:31 AM
syntax question - by El Forum - 06-17-2009, 04:34 AM
syntax question - by El Forum - 06-17-2009, 04:35 AM
syntax question - by El Forum - 06-17-2009, 04:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB