Hi,
Ok, I have a table with columns like this:
itema suba itemb subb itemc subc
How would I select from random either itema and suba or itemb and subb or itemc and subc?
I'm trying this with no lucK
$letter = array("a", "b", "c");
$let = array_rand($letter);
$cola="item$let";
$colb="sub$let";
$get = "SELECT $cola, $colb FROM ...
Am I in the ballpark?
Also, I have a script that is echoing fairly complex tables within a loop containing variables from mysql within. I realize that it will always be a set number of tables so would it be better optimization to just draw the tables out in html beforehand and then use <?php echo $var1 ?> in the cells where need be?
Thanks for any advice on either problem