Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How do I start the array of a range at 1 instead of 0, Code looks like this:
$numbers = range(0, 14);
I tried this but that does not solve my problem
range(1, 14)
key
1 - 14
You can also go for :
$numbers = range(0, 14); array_unshift($numbers,""); unset($numbers[0]);
Add a comment
You could try this:
$numbers = array_combine(range(1,14), range(1,14));
Try this code These will help you
$data = array_slice(range(0,12), 1, null, true);
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
range(1, 14)
instead?key
s to be1 - 14
?