Click to See Complete Forum and Search --> : fwrite in another fwrite?


benq
05-09-2006, 01:10 PM
hi all

at the momeny i have this statement, which writes:

if (isset($_SESSION['checkbox10'])) {
fwrite($handle,'<td><xsl:value-of select="fgeu_code"/></td>'."\n");
}

this writes:

<td><xsl:value-of select="county_UA"/></td>

i want be able to add back colour to the td and i have this so far which writes the statement:

if (isset($_SESSION['radiobutton1']))
{
if ($_SESSION['radiobutton1'] == 'chocolate')
$colour = "#D2691E";
elseif ($_SESSION['radiobutton1'] == 'forestgreen')
$colour = "#228B22";
elseif ($_SESSION['radiobutton1'] == 'turquoise')
$colour = "#00DED1";
}
if (isset($_SESSION['checkbox11']))
fwrite($handle,"<td bgcolor=\"$colour\"><xsl:value-of select=\"county_UA\"/></td>"."\n");

this writes:

<td bgcolor="#D2691E"><xsl:value-of select="county_UA"/></td>

i want to be able just to modify the exisiting line above but with out writing the entire code so it will only add the bgcolor="#D2691E

so it will look like something like this i think:


fwrite($handle,<td bgcolor= fwrite($handle,\"$colour\"><xsl:value-of select=\"county_UA\"/></td>"."\n");

so it will write the line and if the colour is requested it will add the bkgriund colour.

is that possible?

thanks all

benq
05-09-2006, 01:30 PM
here is a picture to see what i mean!

http://img166.imageshack.us/my.php?image=untitled28eq.gif

bokeh
05-09-2006, 01:54 PM
<td bgcolor="#D2691E"><xsl:value-of select="county_UA"/></td> That depracated!

benq
05-09-2006, 03:45 PM
hi

this is exactly the desired effect that i need,

basicaly The columns to display mechanism and the columns to colour mechanism are completely different.

You use the columns to display mechanism to choose what columns you want to display, that is it’s one and only purpose.

You then use the columns to colour mechanism to select which column you would like to colour, then the colour you want to make it.

here is the pic:



http://img293.imageshack.us/img293/7974/sas6vn.jpg