i like them called by name, here is how i do it.
Code
$cprof = array(
ice => 0, // set names and fill them with 0's so we always get a result from a call
fire => 0,
lightning => 0,
wind => 0,
earth => 0,
wildheal => 0,
heal => 0,
focusedheal => 0 );
$c = split(";",$data->cprof);
foreach ($c as $a)
{
$cpn = array( 0 => 'ice', 1 => 'fire', 2 => 'lightning', 3 => 'wind', 4 => 'earth', 5 => 'wildheal', 6 => 'heal', 7 => 'focusedheal');
$temp = split(",",$a);
$cpname = $temp[0];
$cpdata = $temp[1];
$cpname = $cpn[(int)$cpname];
cprof[$cpname] = $cpdata;
}
This post was edited by SilentXer0 on Jan 11 2009 02:43pm