I do not understand, I have such a problem here. PHP refuses to see the value in the array, but it is there, here is a screenshot of the dumps:

alt text

Code:

var_dump($tm[0]); echo '<br>'; var_dump($tm[1]); echo '<br>'; var_dump($teams[$tm[0]]); echo '<br>'; var_dump($teams[$tm[1]]); echo '<br>'; var_dump($teams); 

And I don’t understand why $teams[$tm[0]] is searched normally, but $teams[$tm[1]] not. Although everything is identical, the names are the same, the problem is only with $teams[$tm[1]] .

Help, who can, please :)
Thank you very much in advance)

Comments:

alt text

  • Provide output of the following data: print_r (array ($ tm, $ teams)); var_dump ($ tm, $ teams); And then we'll see. And yes, what mistakes does it write? - Opalosolo
  • I forgot to add that $ tm [0] and $ tm [1] are calculated in the array and change constantly, and $ teams are going to this array, the piece is inserted into the question with a screenshot. - manticore
  • And the error is this: Notice: Undefined index: VFL LONDON in file_name on line 51 NULL Line 51: var_dump ($ teams [$ tm [1]]); - manticore

1 answer 1

Everything was normal, my problem was that there was an unclosed element </ b>, it was displayed only in the source code of the page, removed it and everything is fine.