Hi all, i am quite new to PHP and i was after a little help.
I am building a leaderboard using PHP & SQL for a talent competition, it is working as i want except for one little thing. I have written a page that displays all of the id’s (for text voting), names and scores auto arranging by score and formats it into a 3 column table . If i have 30 names this would obviously give me a table with 30 rows. My question is is it possible to split this into 2 tables side by side of 15 rows so i can make the font bigger and easier to read on a screen?
The database table has 3 columns (id, name, vote_count)
Here is my code so far.
[php]
<?php require_once('connectvars.php'); // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Retrieve the user data from MySQL $query = "SELECT * FROM students WHERE name IS NOT NULL ORDER BY vote_count DESC, name"; $data = mysqli_query($dbc, $query); // Loop through the array of user data, formatting it as HTML echo 'id | Act | Score | ' . $row['id'] . ' | ' . $row['name'] . ' | ' . $row['vote_count'] . ' | '; echo '
---|
[/php]
Any help would be greatly appreciated