Friday, July 31, 2009

Re: Plural Singular with software

As euromark said, you shoudn't bother, because cakephp doesn't rule foreach conditions. It's interesting to maintain the plural/singular in foreach just to maintain your code cleaner, but in cases like (software, people, etc), don't bother. You'll be able to set any name you want to fetch the results.


Regards.
Thiago Elias.





2009/7/30 euromark (munich) <dereuromark@googlemail.com>

foreach ($software as $sware) {}
would work as well as just
foreach ($software as $s) {}
etc
be creative :)

the scope of this var is so small that you should not bother too much
here


On 30 Jul., 17:34, Manolet Gmail <mano...@gmail.com> wrote:
> Hi, im building an application to collect pieces of software. the problem is
> that "software" dont have a plural form.
> i dont know what to do, i know i can create an inflector but... i dont know
> how to call the array for the foreachs, i mean
>
> foreach ($software(plural) as $software(singular)
>
> i know i can use whatever like $software_many but... im looking for the
> right way to do it..
>
> any ideas?



--~--~---------~--~----~------------~-------~--~----~
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: