Quantcast
Channel: PHP
Viewing all articles
Browse latest Browse all 28

Formatting Tables

$
0
0
Hi there,
I have a wordpress custom table, fields are id,category,question,frmname
what i need to have a layout of

CAT1 |CAT2 |CAT3 |CAT4 |CAT5
c1Q1 | c2Q2 | c3Q3 | c4Q2 | c5Q1
c1Q2 | c2Q3 | c3Q4 | c4Q3 | c5Q2
c1Q3 | c2Q4 | c3Q5 | c4Q4 | c5Q3
c1Q4 | c2Q5 | c3Q6 | c4Q5 | c5Q4

so i have
global $wpdb;
$questions = $wpdb->get_results("select * from wp_pods_questions");

foreach ($questions as $question){
//Code........

Formatting Tables

Viewing all articles
Browse latest Browse all 28

Trending Articles