Hi Rowan,

No difference, but : makes for better readability when templating with PHP.
It is easy to see where the foreach ends "endforeach" rather than trying 
to find the matching } symbol.

Cheers,
Stig

Rowan wrote:
> Hi Guys
>
> Just wondering - is there any difference (performance or otherwise)
> between using a Colon or Curly Bracket in the following example:
>
> <?php foreach($zings as $zang): ?>
>   <td><?php //some code ?></td>
> <?php endforeach; ?>
>
> OR
>
> <?php foreach($zings as $zang){ ?>
>   <td><?php //some code ?></td>
> <?php } ?>
>
> Cheers,
> Rowan
> >
>   


--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to