$v) { $line = $skill; foreach ($variable[$skill] as $aspect => $data) { $line .= " ".$aspect.": ".$data; } echo $line."\n"; } will print a readable version of the multidimensional array. :) will return "false" if the username doesn't exist. and somewhere in the aspects of the second dimension of the arrays will be Not Ranked. for whichever skill the user isn't ranked in. Enjoy :) " /> PHP RuneScape stat function - PHP Best Codes

 



Forgot your password?



 

Why sign up?
- One account for five websites!
- Free access to Premium Codes
- Acess to cool web tools
- Ask and answer questions
- Stay ahead of other web developers
- and MUCH MORE!

 





Feel The Power

webPhp Code: PHP RuneScape stat function


you use it like this:

$variable = getStats("RussellReal");

and you will get a two dimensional array.

$variable[$skill][$aspect];

$aspect would be "Level" or "Exp" or "Rank"

so for example: $variable["Strength"]["Level"]; will return 89, which is RussellReals Strength Level :P

not really for looping through the values, unless you use foreachs like so:

foreach ($variable as $skill => $v) {
$line = $skill;
foreach ($variable[$skill] as $aspect => $data) {
$line .= " ".$aspect.": ".$data;
}
echo $line."\n";
}
will print a readable version of the multidimensional array. :)
will return "false" if the username doesn't exist. and somewhere in the aspects of the second dimension of the arrays will be Not Ranked. for whichever skill the user isn't ranked in. Enjoy :)

If you don't know how to use this code or need more information Click here!

Go to Homepage


 

You can leave comments once you sign in/up.


Review

Please Rate this!

Visitor

Onlines:
Total Online:
Recent Members: Moch Husen Hadi Legana, Jezreel, elsopky, hitech40229, Dineshpaswan