Sven
01-20-2008, 09:14 PM
I have the following 'print_r' from a variable:
Array
(
[file] => CML-1-1001.CNC3Replay
[size] => 246 KB
[name] => Automatch Battle: LowLayer R0B0TIK
[desc] => Keine Spielbeschreibung
[mapname] => Small Town USA
[ini] => Array
(
[mapfilename] => data/maps/official/map_mp_2_black5
[gametype] => Online, Ranked, 1 vs. 1
[gamespeed] => 100%
[startcash] => 10000$
[voip] => Ja
[bc] => Ja
[crates] => Nein
[players] => Array
(
[1] => Array
(
[playertype] => Spieler
[playername] => LowLayer
[color] => Orange
[faction] => Zuf?llig
[mappos] => Zuf?llig
[team] => 1
[clan] =>
)
[2] => Array
(
[playertype] => Spieler
[playername] => R0B0TIK
[color] => Rot
[faction] => GDI
[mappos] => Zuf?llig
[team] => 2
[clan] =>
)
)
[matchtype] => Automatch
)
[version] => 1.9
)
The array can either be as a 'sub' array from $attachment --> $attachment['replay'] or a single array $replay.
Now, in the template, I'd like to read the array but it won't work.
What's already working is
<if condition="$attachment['replay']">...</if>
What's not working, for example:
<if condition="$attachment['replay']">$attachment[replay][name]</if>
Nor does, used as a 'stand alone' array $replay, this work:
<if condition="$attachment['replay']">$replay[name]</if>
Could someone please tell me the correct syntax?
Array
(
[file] => CML-1-1001.CNC3Replay
[size] => 246 KB
[name] => Automatch Battle: LowLayer R0B0TIK
[desc] => Keine Spielbeschreibung
[mapname] => Small Town USA
[ini] => Array
(
[mapfilename] => data/maps/official/map_mp_2_black5
[gametype] => Online, Ranked, 1 vs. 1
[gamespeed] => 100%
[startcash] => 10000$
[voip] => Ja
[bc] => Ja
[crates] => Nein
[players] => Array
(
[1] => Array
(
[playertype] => Spieler
[playername] => LowLayer
[color] => Orange
[faction] => Zuf?llig
[mappos] => Zuf?llig
[team] => 1
[clan] =>
)
[2] => Array
(
[playertype] => Spieler
[playername] => R0B0TIK
[color] => Rot
[faction] => GDI
[mappos] => Zuf?llig
[team] => 2
[clan] =>
)
)
[matchtype] => Automatch
)
[version] => 1.9
)
The array can either be as a 'sub' array from $attachment --> $attachment['replay'] or a single array $replay.
Now, in the template, I'd like to read the array but it won't work.
What's already working is
<if condition="$attachment['replay']">...</if>
What's not working, for example:
<if condition="$attachment['replay']">$attachment[replay][name]</if>
Nor does, used as a 'stand alone' array $replay, this work:
<if condition="$attachment['replay']">$replay[name]</if>
Could someone please tell me the correct syntax?