The question at hand is I bypass an array in column 4... but I also have something else that should be going in there from the database but because I am bypassing it and forcing it to show the ony think I want to show it will not show what is being generated from the database... and if I take the bypass out it works with no issues....
any ideas?
[PHP]
// -------------------------------------------------------------------------------
// Determine the highest number of $outArray entries for each colno, so we know
// how many table rows we have to generate
// -------------------------------------------------------------------------------
// 1. store the number of entries for each colno
$ent = array(count($ou tArray[$colArray[0]]),count($outArr ay[$colArray[1]]),count($outArr ay[$colArray[2]]),count($outArr ay[$colArray[3]]));
// 2. sort the entry counts in ascending order
sort($ent);
// 3. last entry must be highest, i.e. the number of table rows to build
$nr = $ent[3];
// --------------------------------------------------------------------------
// Start the output table and generate the header columns
// --------------------------------------------------------------------------
echo "<table border='0' style='border-collapse:collap se;'>";
echo "<tr>".
"</tr>";
// --------------------------------------------------------------------------
// loop through the $outArray array and construct the output HTML table
// --------------------------------------------------------------------------
for ($j=0; $j<$nr; $j++) {
// start a new row
echo '<tr>';
// there are four colno's, so we fill them from 0 to 3
for ($i=0; $i<4; $i++) {
// get the colno name (= key)
$col = $colArray[$i];
// here we have a new $outArray entry
// determine which vertical cell borders this one, depending on the colno ($i)
/* switch ($i) {
// left cell (column 1): right vertical borderline generation
case 0 : echo '<td style="padding: 0;margin:0;widt h:15px;backgrou nd: url(images/template_15.gif ) repeat-y;"></td>';
$cls='tdleft';
break;
// middle cells (columns 2,3): left and right vertical borderlines generation
case 1 :
case 2 : $cls='tdmid';
break;
// right cell (column 4): left vertical borderline generation
default: $cls='tdright';
break;
} */
// ---------------------------------------------------------------
// if this $outArray entry contains data: construct the <td> cell
// ---------------------------------------------------------------
if (is_array($outA rray[$col][$j])) {
// first save all $outArray entries in simple variables
$ais = $outArray[$col][$j]['aistpic']; // image name
$exp = $outArray[$col][$j]['exppartno']; // part number
$des = $outArray[$col][$j]['desc']; // explanation
$msr = $outArray[$col][$j]['msrp']; // price
$bun = $outArray[$col][$j]['buynow']; // this is the url or text
// *************** *************** *************** *************** **************
// START OF ACCESSORIES BYPASS
// fill the $outArray array with the accessories image and links
// *************** *************** *************** *************** **************
$outArray[4][0]['aistpic'] = 'images/aist/chemicals.jpg'; // image name
$outArray[4][0]['exppartno'] = ''; // part number
$outArray[4][0]['desc'] = '<a href="#" target="_blank" >Chemicals</a>'; // this is the url
$outArray[4][0]['msrp'] = ''; // price
$outArray[4][0]['buynow'] = '';
[/PHP]