I want to go ahead a have my text, and text color to change by using php (or html).
Here is my example:
%26quot;Today is a red day%26quot; (%26quot;Red Day%26quot; is in red)
%26quot;Tomorrow is a black day%26quot; (Black Day%26quot; is black)
How can I change Red Day into Black Day and vise versa?Change website text and tect color with PHP?Keep in mind that PHP is more the backend programming language - it's what makes the site %26quot;dynamic%26quot;. Your question specifically deals with formatting of styles - which falls into HTML and CSS.
To answer your question more accurately, there are a few options available to you - I'll cover the two easiest:
1. Use the font tag. The first source below will go over this in detail, but basically something along the lines of:
Today is a %26lt;font color=%26quot;red%26quot;%26gt;red day%26lt;/font%26gt;
2. Use divs. This is the better option if you intend to make this dynamic possibly later, that is, using Javascript to change the color later. The second source will give you an introduction to divs but basically it's something like:
Today is a %26lt;div class=%26quot;redday%26quot;%26gt;red day%26lt;/div%26gt; and as the style it'd be something like: .redday { font-color: red; }Change website text and tect color with PHP?Dude. use javascript...that's what is for...