Damn undefined index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Krucifyx
    Senior Member
    • Jun 2000
    • 115

    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?
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    Try $var1["$var2"]

    Comment

    • Krucifyx
      Senior Member
      • Jun 2000
      • 115

      #3
      Nope, that hasn't worked either.

      Comment

      • Toliman
        Senior Member
        • Dec 2000
        • 101

        #4
        Maybe

        $x = "$var1[$var2]"

        Comment

        Related Topics

        Collapse

        Working...