Page 1 of 1

Display array onto html table

Posted: Mon Jan 30, 2012 8:39 am
by Shadowrider50
How can i display an array onto a html table?
The array i am trying to put onto a table is being pulled from another server.
If you want to see what it's like at the moment, you can see here
"and just pick the 4 checkboxes and input into the text box "Shadowrider50".
It looks very messy without a table or some sort of organization

Re: Display array onto html table

Posted: Mon Jan 30, 2012 1:11 pm
by StathisG
You'll have to iterate through the array using for or foreach (check the examples; they'll help you a lot) and display its content the way you want in a <table>.

Re: Display array onto html table

Posted: Sun Feb 19, 2012 9:37 am
by Shadowrider50
Hi,
Thanks for the answer,

i just read up on how to reference single elements from arrays and i've got it working now :)

I'm using it this way now

Code: Select all

$trophyplatinum = $getCount["0"][platinumtotal];
$getCount has the array stored of trophy information and i just store a single part of that array into $trophyplatinum.
I do the same for all other parts of the array.
This way i can use them anywhere easily by just calling that variable