i think you are making a fuzz about nothing here :) in the end you need more time to create sth like this than you needed if you did write some function yourself
if any of cake's functions can be used here it will be Set::extract() - or any other method of the Set class check if out - especially the test cases (they usually give you a pretty good idea) if not, simply write it yourself and put it into a lib in order to use it again in other projects/places etc On 7 Jun., 23:50, Schemer <[email protected]> wrote: > I think you misunderstood my question. You can do real complex find > conditions on your fields in cake. And since im not dealing with a > field, in my case an array of strings, i cant use the find function. > So array_filter is the way to go. But is there a function which i can > pass to array_filter, which will filter out the strings i do not want > > so if i have an array > $array={Red Cat, Blue Cat, Green Cat, Red Dog, Red Bird, Purple Bird} > > and i want to return all the values with Red in it, can i do something > like > > $new_array=array_filter($array, function("Red")); > > print_r($new_array) -----> prints the array of {Red Cat, Red Dog, Red > Bird} -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
