Avatar of Crazy Horse
Crazy Horse
Flag for South Africa

asked on 

Correct way to style text based on status from database

If something is unread I want to make it bold but if read then it must display as normal (not bold). I just want to know if the way I have done it is okay or perhaps there is a better way?

if($read_status == "unread"){
   echo "<strong>" . $db_name . "</strong>";
      } else {
           echo $db_name;


Open in new window


Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon