|
Well I don't know if it's the best way of setting up your array but you mentioned you want to avoid redundant data so you could note that every x coordinate is equal to 59 + (66 * Xindex) and every y coordinate is equal to 15 + (36 * Yindex). Value is undefined so far but I assume it's going to show up eventually.
You could make your array look like array( "Farming" => array(0,0,0), ... ) Then run each value through the conversion function as you loop through e.g, $x = 59 + 66 * $skill_array["Farming"][0]; $y= 15 + 36 * $skill_array["Farming"][1];
Alternatively, you could make your data more compact by doing array( "Farming" => "0.0.0", ... ) In ths case you run it through explode or split before you convert it to the true values for set_value().
In each case it's just trading data compactness for processing time.
__________________
Stop intellectual property from infringing on me
|