I donβt know how to make my id a key in an array, and I donβt even think that this is possible with Cake without doing something βfunnyβ.
But if you find everything, I have to assume that you are going to process the data and loop at some point, and at this time you might have something like:
foreach ($wijkens as $wijken) { [...]do the general things here[...] if ($wijken['Wijken']['id'] == $url_id) { [...]do the thing you want to specifically do to id = 1 here[...] } }
On the other hand, I understand that you do not need any additional request, although it seems to me that this is a relative insignificant transaction cost, and still I would prefer.
source share