Multi-Dimensional Arrays Help - And Other Questions on Arrays

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    some improvement on the code
    Code:
    $colors[0]['blue'];
            ^--- use integers for numeric arrays

    Comment

    • fjm
      Contributor
      • May 2007
      • 348

      Originally posted by Dormilich
      some improvement on the code
      Code:
      $colors[0]['blue'];
              ^--- use integers for numeric arrays
      Thanks Dormilich.. Isn't a 0 an integer?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        Code:
         0  // integer
        '0' // string

        Comment

        • fjm
          Contributor
          • May 2007
          • 348

          Originally posted by Dormilich
          Code:
           0  // integer
          '0' // string
          Exactly.. That's why I'm a bit confused. I'm not using quotes which should make it an int. No?

          Comment

          • fjm
            Contributor
            • May 2007
            • 348

            Nevermind.... I see it and your right. Thanks Dormi... :)

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              sometimes those type changes can make all the difference in the world (I just got prodded to that yesterday)

              Comment

              Working...