RowdyBurns
asked on
Apply a style class to a php echo
Hi experts,
I need to apply my font formatting class 'ranking2' to the output of this php script. Please can you tell me how I need to add the html to get the the php echo formatted with the 'ranking2' class.
I need to apply my font formatting class 'ranking2' to the output of this php script. Please can you tell me how I need to add the html to get the the php echo formatted with the 'ranking2' class.
$newText = $row_currentBlog['BlogEntry'];
$newText .= "<BR class=\"ranking2\">"."This entry was recorded at: ".$blogdate."<BR>".$blogentry."<BR>";
you mean, you are looking for how to defined the ranking2 class (css style) in your html document?
ASKER
No. I can add the CSS class to the echo in the html document, but this is applied to the all of the echo. What I am trying to do is to format the text "This entry was recorded at:" and the .$blogdate. before it is echoed in the html because the .$blogentry. needs to formatted differently.
Try this...
$newText = $row_currentBlog['BlogEntry'];
$newText .= "<br /><span class=\"ranking2\">"."This entry was recorded at: ".$blogdate."<br />".$blogentry."</span><br />";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The second one nailed it! Thanks lot lot for your help Paseur.
You have a good day.
You have a good day.