Objective:
When i want to remove first element from array and preserve key it happened. That is array shift only return key or change the key value of php array.
Technolog:
php-8.2
Challenge:
Here, Changed that array keys.
Solution:
`array_slice()` used to preserve that array key.
syntax:
array_slice(array, starting position, length, preserve_keys);
Comments
Post a Comment