0

How to make Month and Celebrants change its color to yellow? Thank You

echo date('M'). "  ". ('Celebrants');
4
Contributors
6
Replies
8
Views
5 Years
Discussion Span
Last Post by simplypixie
0

You can use HTML tags within echo "<font color='yellow'>This is some text!</font>"

Edited by Javvy

Votes + Comments
Don't use in-line styles now - all bad
0

Yeah, like @Javvy said just use HTML tags.. So something like this:

<?php

date_default_timezone_set('UTC');

$d = date("M");

echo "<font color='yellow'>$d</font>";
?>
Votes + Comments
Don't use in-line styles now - all bad
0

gives me an error. Sorry I am new in php so I do not know how to handle this one. Thank You!

  echo "<font color='yellow'> " date('M'). "  ". ('Celebrants')" </font>";
0

wow @simplypixie for down voting.. I'll code up a style sheet next time, just to show the user an example. :S

-1

Set a style in you style sheet and apply that.

In style sheet:

.date-celebrants {
    font-color: yellow;
}

And in you HTML/PHP put:

echo '<span class="date-celebrants">' .date('M'). ' ' .('Celebrants'). '</span>';
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.