Forum Moderators: coopster
"rm_map_statistics"
{
"de_dust"
{
"total_votes" "100"
"total_excellent_votes" "50"
"total_good_votes" "20"
"total_average_votes" "20"
"total_poor_votes" "8"
"total_very_poor_votes" "2"
"STEAM_ID_LAN" "very poor"
}
"zm_lolol"
{
"total_votes" "100"
"total_excellent_votes" "50"
"total_good_votes" "20"
"total_average_votes" "20"
"total_poor_votes" "8"
"total_very_poor_votes" "2"
"STEAM_ID_LAN" "very poor"
}
"cs_lololol"
{
"total_votes" "100"
"total_excellent_votes" "50"
"total_good_votes" "20"
"total_average_votes" "20"
"total_poor_votes" "8"
"total_very_poor_votes" "2"
"STEAM_ID_LAN" "very poor"
}
} Is there anyway that I can put all this values for each map on an array?
I've tried a parse that my friend made for me
$regs = preg_match('/"([^"])"[^\{]*\{([^\}]*)}/',$get); Your friend's regex is pretty close. The '1' you're seeing is the number of matches it found, which would be either 0 or 1 for preg_match. Try this:
$matches = preg_match_all('#"(.*)" "(.*)"#m',$get,$answers);
print_r($answers);
The resulting array would be more meaningful if you broke up the maps first.