> Sorry, that last example should have read:
>
> echo
> div('foo',
> (function () { $acc = '';
> foreach(...) $acc .= ...;
> return $acc; })());
Was this an academic exercise in how to make the least legible code
instead of typing
<div>
..
<?php foreach($foo as $bar){
.....
}
?>
</div>
? You have 0 hope, assuming you got it to work, of anyone except
yourself understanding what your example does.
I hope at some point you look at what you were asking in this thread
and say to yourself "WTF was I thinking?!?" :)
AD
PS the tag function's primary use is within other helper functions -
not necessarily in your own view files.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment