How can i get the data from a query as a flat, non-indexed array?
I can’t use the ‘list’ option since i need it to be done with a query() call
How can i get the data from a query as a flat, non-indexed array?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As Cake always returns results as an array with named keys you’re bound to apply some post processing.
You can achieve the desired result, either by using a plain
foreachloop to manipulate the array to your liking, or by using one of the methods from the Core Utility Library included in Cake.Set::combinemight be what you’re looking for.