array(4) {
[0]=> array(1)
{ ["perm_desc"]=> string(10) "Can Delete" }
[1]=> array(1)
{ ["perm_desc"]=> string(8) "Can Edit" }
[2]=> array(1)
{ ["perm_desc"]=> string(10) "Can Create" }
[3]=> array(1)
{ ["perm_desc"]=> string(16) "Can Manage Roles" }
}
I am struggling to find the right way to loop over these arrays. so basically i have pulling all permissions from the database and i want it in 1 single array so i can manipulate late when needed. but the database is spittiing this data out in multiply arrays.
$results = static::customQuery($sql, ["role_id" => $role_id]);
if ($results) {
foreach ($results as $r) {
var_dump($r);
die();
}
I get this back just 1 result from the original array which contains 4 array
array(1) { ["perm_desc"]=> string(10) "Can Delete" }
but really i want something like this
['Can Edit', 'Can Manage', 'Can Create', 'Can Manage Roles']
and idea would be really helpful