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

echo date('M'). "  ". ('Celebrants');

Recommended Answers

All 6 Replies

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

commented: Don't use in-line styles now - all bad -1

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>";
?>
commented: Don't use in-line styles now - all bad -1

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>";

yeah.. great.. Thank You so much ;)

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

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>';
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.