-4

How can I change the color of the word "Validação"? Thank you

echo "A Aguardar <b>Validação</b>";
Azer
  • 1,200
  • 13
  • 23
Pedro
  • 57
  • 6

2 Answers2

2

Changing color is a CSS task.

You can add it by using adding a CSS class/ID to it:

Steps:

1) Add class special to respective text string.

2) Define the class body using <style> attribute.

<?php
echo 'A Aguardar <b class="special">Validação</b>';
?>

<style>
    .special {
       color: yellow;
    }
</style>
Pupil
  • 23,834
  • 6
  • 44
  • 66
1

You can try like this, search with tag and text and replace with css of it

$str = "A Aguardar <b>Validação</b>";
$str = str_replace("<b>Validação</b>","<b style='color:red'>Validação</b>",$str);
naththedeveloper
  • 4,503
  • 6
  • 36
  • 44
Rahul
  • 18,271
  • 7
  • 41
  • 60