Announcement

Collapse
No announcement yet.

Damn undefined index

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Damn undefined index

    I have error_reporting(E_ALL) turned on, so that if I don't use apostrophes within an array (i.e $var['name']), I receive the appropriate error. Unfortunatly, I cannot figure out a way to use $var1[$var2] without receiving an error. You cannot use apostrphes within it as it as it will take $var2 literally. Any ideas on how to format it to not receive an undefined index error?

  • #2
    Try $var1["$var2"]

    Comment


    • #3
      Nope, that hasn't worked either.

      Comment


      • #4
        Maybe

        $x = "$var1[$var2]"

        Comment

        Related Topics

        Collapse

        Working...
        X