Does CI4 has something similar than it is Laravel's Collection? |
For easy manipulation with arrays? Like sorting, checking if element exists etc.?
We only have one Array function built in: dot_array_search
https://codeigniter.com/user_guide/helpe...elper.html Sorting are already fairly simple to use if I may say so myself. Just look them up on php.net and you will see what you need to pass in to sort it the way you like. sort() - sort arrays in ascending order rsort() - sort arrays in descending order asort() - sort associative arrays in ascending order, according to the value ksort() - sort associative arrays in ascending order, according to the key arsort() - sort associative arrays in descending order, according to the value krsort() - sort associative arrays in descending order, according to the key
@easyD,
The direct answer to your question is no. You are able to use the PHP functions directly or you could make a useful library. This is what CI4 has ( https://codeigniter.com/user_guide/helpe...ray-helper ). |
Welcome Guest, Not a member yet? Register Sign In |