smerny Posted March 5, 2012 Share Posted March 5, 2012 What am I missing here? The array: protected $form_bonus = array( "Attacker" => array( "Ashwin" => array( "normal" => 1.15, "rps" => 1.38), "Cordelon" => array( "normal" => 1.15, "rps" => 1.38), "Mersan" => array( "normal" => 1.15, "rps" => 1.38), "Phlanixian" => array( "normal" => 1.195, "rps" => 1.494), "Slythe" => array( "normal" => 1.15, "rps" => 1.38) ), "Defender" => array( "Ashwin" => array( "normal" => 1.15, "rps" => 1.38), "Cordelon" => array( "normal" => 1.15, "rps" => 1.38), "Mersan" => array( "normal" => 1.15, "rps" => 1.38), "Phlanixian" => array( "normal" => 1.15, "rps" => 1.38), "Slythe" => array( "normal" => 1.15, "rps" => 1.38) ) ); accessing it: $bonus *= form_bonus[$this->role][$this->race]['rps']; error: PHP Parse error: syntax error, unexpected '[' Link to comment https://forums.phpfreaks.com/topic/258290-help-with-a-multi-level-array/ Share on other sites More sharing options...
smerny Posted March 5, 2012 Author Share Posted March 5, 2012 meh.. noticed right after i posted... missed the $ on the array var Link to comment https://forums.phpfreaks.com/topic/258290-help-with-a-multi-level-array/#findComment-1324005 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.