Blog Thread
- CakePHP3: Fetch a particular column from all rows
Please fill in the below form to get in contact with me. Subject and message fields are required.
id | country | capitol |
1 | USA | Washington DC |
2 | Japan | Tokyo |
3 | United Kingdom | London |
['Washington DC', 'Tokyo', 'London']
$capitols = $this->countries
->find()
->extract('capitol')
->toArray();