M
M
Maxim Sobolev2020-11-14 17:59:09
Yii
Maxim Sobolev, 2020-11-14 17:59:09

How to make a condition in php so that certain text is a different color?

Hello! I'm new to PHP, so don't judge strictly)

There is such a piece of code

<li><b><?php echo T($plan['description']); ?></b></li>


It works fine, displays a description of the tariff plan.
The question is - you need to make a condition below, so that if he finds the word HIT in the description of the tariff plan, he would make the color of the word HIT red.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
index0h, 2016-08-11
@index0h

About the existence of $_POST, $_GET, ... after you have collected the Request, in principle, you should forget.

P
posters, 2020-11-14
@webrussia

phpfiddle.org/lite/code/e957-gp4a
Will it work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question