This is a test to use content inside of the database to process codes on each page and then break them down and grab the appropriate content to insert it into the page. This is what I have so far, and it works ... kinda. Here's what's going on.
the arrays 'design_type' and 'design_id' are exactly the same length. The 'array_type' tells the server what kind of content to grab - in this case, other tables that line the right side of the page. The 'array_id' is the identifier for which row in this 'design' table to go fetch.
With the code below, it grabs the second value from the arrays and processes it. I think because of the $w value being one, but I'm not exactly sure. It's supposed to repeat itself, placing 3 different items on the page. Right now it's only doing one. Why isn't this repeating?
for ($w=0; $w<count(design_type); $w++) {
if ($design_type[$w] == 1) {
$colname_sidecontent = (get_magic_quotes_gpc()) ? $design_id[$w] : addslashes($design_id[$w]);
$sidecontent_query = sprintf("SELECT * FROM `design` WHERE `id`=%s", $colname_sidecontent);
$sidecontent = mysql_query($sidecontent_query, $DB_Con) or die(mysql_error());
$row_sidecontent = mysql_fetch_assoc($sidecontent);
$totalrows_sidecontent = mysql_num_rows($sidecontent);
//echo "<br>" . $totalrows_sidecontent;
echo $row_sidecontent['content']."<br>";
}
}