Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7650935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:22:46+00:00 2026-05-31T11:22:46+00:00

i have month array like $month = array( 01 => January, 02 => February,

  • 0

i have month array like

$month = array(
    01 => "January",
    02 => "February",
    03 => "March",
    04 => "April",
    05 => "May",
    06 => "June",
    07 => "July",
    08 => "August",
    09 => "September",
    10 => "October",
    11 => "Novemeber",
    12 => "December"
);

but when i print_r this it display like this

Array
(
    [1] => January
    [2] => February
    [3] => March
    [4] => April
    [5] => May
    [6] => June
    [7] => July
    [0] => September
    [10] => October
    [11] => Novemeber
    [12] => December
)

it displaying sept as 0 and the month of august is not dispalying.

can any one please tell me what is the problem with this.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:22:48+00:00Added an answer on May 31, 2026 at 11:22 am

    Nubmber starting from 0 are interpreted as octal constats.

    Since 8 and 9 are not a valid digits in octal, 08 and 09 are invalid numbers and both interpreted as just 0. “08” is string and even in case of arithmetical operations, will be interpreted as normal decimal integer:

    "echo '08'+'08'; // 16
    

    Hence using strings should be safe for your case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this months array: [January, March, December , October ] And I want
I have to fill a combobox with month in English: January, February, etc. I
I have an array with a series of event IDs organized like this: $event['year']['month']['day']
I have an array of entries that are separated by year and month like
I have 3 collection datatable that shows in this below Month: January ID NAME
I have a javascript array of dates, in the form {year:'2010',month:'6',day:'23'} I need to
I have an array structure like this : Array ( [donate] => Array (
I have an array that looks like the following: [Wed Jan 04 21:56:08 UTC
I have a array that contains all the months in a year like so:
I have an array of strings of the format Year-Month_ID. I'd like to split

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.