Answer the question
In order to leave comments, you need to log in
How to remove a key in an array?
Hi. How to get an array of type [23, 43, 543, 54]
from the database, laravel [0 => 24, 1 => 43, 2 => 321]
gives
Answer the question
In order to leave comments, you need to log in
What kind of array is [23, 43, 543, 54] ?
In PHP, an entry like $arr = [23, 43, 543, 54];
this Creates an array like this: [0 => 23, 1 => 43, 2 => 543, 3 => 54]
There are no "arrays like [23, 43, 543, 54]" in PHP, it's just syntax, how can we create an array by hand, where each value will be assigned an ordinal index starting from zero.
2 questions for you:
1. What for you "arrays like [23, 43, 543, 54]"? What do you want to do with it?
2. What do you dislike about what Laravel outputs?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question