Posted: Sun Sep 03, 2006 12:05 pm
Ok also Everah looking over this thread you mentioned before this piece of code
This is very similar to what i am doing, its just doing it a different way. Basically if sectionid=18 then class=contentheadingps3
So i tried this code just there and without the In the Cell bit. Let me say first the css is used to display an image next to title of article and also controls title text color etc. Ok so i take it this uses a loop? Because it ends up showing the small blue squares hundreds of times and then next to those on the same row it shows red ones as well for each article title. I just want it to see if the article is sectionid=18 then use class=contentheadingps3. Is there somethin 'wrong' in the code
Code: Select all
<?php
$css_append = '';
$system = mysql_query("select * from mos_content") or die(mysql_error());
while ($donnee = mysql_fetch_array($system))
{
if ( 18 == $donnee['sectionid'] )
{
$css_append = 'ps3';
}
echo '<tr><td class="contentheading' . $css_append . $params->get('pageclass_sfx') . '" width="90%" >In the cell</td></tr>';
}
?>So i tried this code just there and without the In the Cell bit. Let me say first the css is used to display an image next to title of article and also controls title text color etc. Ok so i take it this uses a loop? Because it ends up showing the small blue squares hundreds of times and then next to those on the same row it shows red ones as well for each article title. I just want it to see if the article is sectionid=18 then use class=contentheadingps3. Is there somethin 'wrong' in the code