Re: RES: [PHP] CSS and variables

2009-11-21 Thread tedd
This might help: http://sperling.com/examples/pcss/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] CSS and variables

2009-11-20 Thread Phil Matt
De-lurking here. I'm trying, with no success, to use some CSS styling on my PHP output. Here's the code I want to style: echo 'trtd class=spacer'.$row[0].'/tdtd'.$row[1].'/td I want to use a CSS style for the second td cell, picking up the style from the value of a variable. I tried this:

Re: [PHP] CSS and variables

2009-11-20 Thread richard
Hi, $newcolor = color: red; td style= ? echo($newcolor): ?'.$row[1].'/td But it doesn't work. No problem with th spacer class, works fine. I just can't get the syntax for pulling a CSS style from a PHP var. You could do this: ?php $newcolor = 'red'; echo td

Re: RES: [PHP] CSS and variables

2009-11-20 Thread Phil Matt
Jônatas Zechim wrote: Try: echo 'td style=' . $newcolor .'' . $row[1] . '/td'; Thanks, Jônatas. This was the solution. Cheers --- Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php