-1
I have 2 arrays, a blank( let’s call tenStatesArray) that I want to contain 10 values and another containing 26 values( let’s call statesArray). How to pass the first 10 elements of this array containing 26 to tenStatesArray ?
-1
I have 2 arrays, a blank( let’s call tenStatesArray) that I want to contain 10 values and another containing 26 values( let’s call statesArray). How to pass the first 10 elements of this array containing 26 to tenStatesArray ?
0
Whereas you want the first 10 elements, you can use the function array_slice
php native.
$tenStatesArray = array_slice($statesArray, 0, 10);
Browser other questions tagged php array codeigniter iterator
You are not signed in. Login or sign up in order to post.