Page 2 of 2
Posted: Sat Mar 27, 2004 10:59 am
by Illusionist
youc an change
to
Code: Select all
echo "<pre>";
print_r($output);
echo "</pre>";
and it'll be easier to read!
Posted: Sat Mar 27, 2004 11:13 am
by bawla
man i dont get php at all,
how would i be able to organize this better
like Short Group Name, Points,etc. for each group and a new group gets a new line
and y does that 'output'
array(32) { [0]=> array(7) { ["Short name of Group"]=> string(4) "BomB"
i mean y does it show array(32) { [0]=>array(7)
Posted: Sat Mar 27, 2004 5:36 pm
by Illusionist
ok, look after you run that script, it will create a multideminsional array. say you wanted the first clans name and points. You would do:
Code: Select all
echo $output[0]['Short name of Group']; //will return BomB
echo $output[0]['Points']; //will return 10319814(unless its changed)
//for the second clan, you'd change teh first [0] to [1] and os on.
Does that help you understand??
[php_man]var_dump()[/php_man] function will dump everything in the variable. It will tell you how many elements are int he array and the length of strings, and i dunno what all else. But if you use print_r, it will just show you the array.
Posted: Sat Mar 27, 2004 6:44 pm
by bawla
i understand now, thanks
Posted: Sat Mar 27, 2004 6:55 pm
by Illusionist
yeah, no problem!