On Fri, 2002-01-18 at 13:54, Darren Gamble wrote:
> Good day,
> 
> The reason that the first statement doesn't work as intended is due to the
> order that the operands are processed.
> 
> The operands in the line:
> 
> "<td>" . ($i*8)+$j . "</td>"
> 
> are being processed like this:
> 
> ("<td>" . ($i*8))+($j . "</td>")
> 
> If you change the line to:
> 
> "<td>" . (($i*8)+$j) . "</td>"
> 
> then you'll get the desired result.
> 
> Rule of thumb: Use parenthesis whenever you have a complex operation to
> ensure the result is what you want.

Hmmm - so my assumption that the concatenation operator between the
strings gives them a delination equivalent to listing this as three
separate echo statements is incorrect, I take it.

Shouldn't the echo function process it in this manner from a standpoint
of consistency?

Thanks for the clarification.

Billy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to