I have and array called $team in PHP that looks like this:
array(22) { ["league_name"]=> string(28) "1.súdánská liga 2020/2021" ["league_id"]=> string(6) "173720" ["sport_id"]=> string(3) "301" ["team_id"]=> string(6) "743616" ["team_name"]=> string(16) "Al Ahli Khartoum" ["display_name_long"]=> string(16) "Al Ahli Khartoum" ["display_name_short"]=> string(16) "Al Ahli Khartoum" ["when_added"]=> string(19) "31.12.2020 11:36:25" ["LV_team"]=> string(1) "." ["PZ_team"]=> string(1) "." ["Bc_team"]=> string(1) "." ["Bc_team_id"]=> string(1) "." ["Su_team"]=> string(1) "." ["Su_team_id"]=> string(1) "." ["To_team"]=> string(1) "." ["To_id"]=> string(1) "." ["LS_team"]=> string(1) "." ["LS_id"]=> string(1) "." ["eW_team"]=> string(1) "." ["eW_id"]=> string(1) "." ["bX_team"]=> string(1) "." ["bX_id"]=> string(1) "." }
I can echo any element from that table using for example:
echo $team['team_id']
to get "743616"
But I can't use echo $team['league_name']
to get "1.súdánská liga 2020/2021"
I'm receiving error: Undefined index: league_name in xxx.php on line xxx. It's not the first time I'm having problems with 1st element in array. Array is made from csv file (don't know if that info is needed).