Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

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.
$newText = $row_currentBlog['BlogEntry'];
$newText .=  "<BR class=\"ranking2\">"."This entry was recorded at: ".$blogdate."<BR>".$blogentry."<BR>";

Open in new window

0
RowdyBurns
Asked:
RowdyBurns
  • 2
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you mean, you are looking for how to defined the ranking2 class (css style) in your html document?
0
 
RowdyBurnsAuthor Commented:
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.
0
 
Ray PaseurCommented:
Try this...
$newText = $row_currentBlog['BlogEntry'];
$newText .=  "<br /><span class=\"ranking2\">"."This entry was recorded at: ".$blogdate."<br />".$blogentry."</span><br />";

Open in new window

0
 
Ray PaseurCommented:
Oh, new criteria... OK, try this...
$newText = $row_currentBlog['BlogEntry'];
$newText .=  "<br /><span class=\"ranking2\">"."This entry was recorded at: ".$blogdate."</span><br />".$blogentry."<br />";

Open in new window

0
 
RowdyBurnsAuthor Commented:
The second one nailed it! Thanks lot lot for your help Paseur.
You have a good day.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now