Based on the output of the following, I was wondering if anyone could assist me:
$monthsOfTheYear = range(1, 12);
print_r ($monthsOfTheYear);
I understand the above process, but what would be the most effective method to recreate this principle with a for loop? I've come up with the following so far:
$months = ("January", "February", "March", "April", "May", "June", "July", "August", September", "October", "November", "December") {
for($months{0} = 1, $months{11} = 12, /*????*/) {
echo "/*????*/";
} }
If possible I'd like to know how to achieve this within the code for the loop, though I suspect it may require a more complex solution.