building a lil site for my boss taking a html template and making it php so everything is stored in a db and i can then have it easily editable for him, anyway here is my problem
my crappy code
[php]mysql_select_db($database_local, $local);
// sample query, get members
$query = mysql_query(“select name from faq_cat”);
// count total number of items to show
$total = mysql_num_rows($query);
// initiate row counter
$counter = 3;
// initiate columns contents
$column_1 = ‘’;
$column_2 = ‘’;
$column_3 = ‘’;
$column_4 = ‘’;
$column_5 = ‘’;
$column_6 = ‘’;
$column_7 = ‘’;
$column_8 = ‘’;
$column_9 = ‘’;
while($row = mysql_fetch_assoc($query)){
// caluculate column for current element from total items to be showed number of columns and current item
$column = get_column($total, 9, $counter);
if($column == 1){
$column_1 .= $row['name'];
}
if($column == 2){
$column_2 .= $row['name'];
}
if($column == 3){
$column_3 .= $row['name'];
}
if($column == 4){
$column_4 .= $row['name'];
}
if($column == 5){
$column_5 .= $row['name'];
}
if($column == 6){
$column_6 .= $row['name'];
}
if($column == 7){
$column_7 .= $row['name'];
}
if($column == 8){
$column_8 .= $row['name'];
}
if($column == 9){
$column_9 .= $row['name'];
}
$counter++;
}
// show content in two table comments
echo “<div id=“content”>
<div class=“row-1”>
<div class=“indent”>
<div class=“wrapper”>
<div class=“box”>
<div class=“corner-top-left png”>
<div class=“corner-top-right png”>
<div class=“border-top png”><img src=“images/3page-title1.gif” alt=”" />
<div class=“box-content”>
<div class=“row-3”>
<div class=“wrapper”>
<div class=“col-1”>
<ul class=“list no-padding”>
<div class=“col-2”>
<ul class=“list no-padding”>
<div class=“col-3”>
<ul class=“list no-padding”>
";
?>[/php]
i dont see anything wrong, but for some reason im only getting 1 row in the first column and the last row just conjoins i guess with the other rows.
heres what its supposed to look like, which yes i know to do what i want i need to learn ajax aswell.
http://i.imgur.com/LQh9m.gif
and heres how it looks now
http://i.imgur.com/Xizvz.gif