View Full Version : font style in php

12-28-2003, 10:40 PM
How can I add a font style like this:

<FONT STYLE="face: Verdana, Arial, Helvetica, sans-serif; font-size: 9
px; color: #000000; font-style: normal; text-decoration: none">

to this php line code:

$table_rows .= "<tr valign=\"top\" height=\"10\">\n<td width=\"15%\" align=\"left\">".$data ["sku"]."</td>\n<td width=\"40%\" align=\"left\">".$data ["description"]."</td>\n<td width=\"10%\" align=\"center\">".$data ["quantity"]."</td>\n<td width=\"5%\" align=\"right\">".$data ["price"]."</td>\n<td width=\"5%\" align=\"right\"></td>\n<td width=\"5%\" align=\"right\">19.0</td>\n<td width=\"20%\" align=\"right\">".$display_line_total."</td>\n</tr>\n";

Possible to use use a css style sheet ?

12-28-2003, 11:07 PM
yes, u can use css style sheet, just add the class in where u needed in the html code.
or use whatever style u need but make sure that all quotes ( " ) are escaped with backslash: ( \" )

12-28-2003, 11:13 PM
start by replacing you \" with ' it shows up the same for browsers and it'll be easier to read for you

$table_rows .= "<tr valign='top' height='10'>\n<td width='15%' align='left'>".$data ["sku"];

$table_rows .="</td>\n<td width='40%' align='left'>".$data ["description"];

$table_rows .="</td>\n<td width='10%' align='center'>".$data ["quantity"];

$table_rows .="</td>\n<td width='5%' align='right'>".$data ["price"];

$table_rows .="</td>\n<td width='5%' align='right'></td>\n<td width='5%' align='right'>19.0</td>\n<td width='20%' align='right'>".$display_line_total."</td>\n</tr>\n";

thast how i might formulate it

12-29-2003, 01:43 AM
tks for the tips.
working good both ways :)