Hi, whilst i'm not really 'new' to PHP, I haven't used arrays all that much, not in this sense at least...
The array is in question is an assoc array, and i'd like to get the key name and it's value and put them in a table (HTML).
”Array ( [Username] => James [Password] => 8063b4d64886bcf42552200f95cacc58997e4dea5b66e87f517f9713b17fddba [Salt] => 0 [Money] => 622 [Bank] => 10000 [Lincoln] => 44 [Loughborough] => 0 [Lady_GaGa] => 0 [Xbox] => 0 [Playstation] => 0 [Wii] => 0 [Football] => 0 [Rugby] => 0 [Golf] => 0 [Paris] => [London] => [F1] => [New_York] => [Cricket] => )
The format for the table will be dependent on having a value greater than 0, furthermore, I would like to discard the first few keys (Username - Bank). So, then my table can be as follows.
E.g.
Lincoln | 44
Rugby | 102
etc. etc.
It will have more columns but i'm confident i'll be able to do that myself.
So, what do you think the best way to go about doing it would be? If you could relate your answers to the query below, that would be helpful as I think it will be easier to understand.
$usArray = mysql_query("SELECT * FROM Users WHERE Username = '$usr' LIMIT 1") or die(mysql_error());
$usRow = mysql_fetch_assoc($usArray);