Como faço para o script abaixo mudar a cor da fonte quando o texto for igual a VENDA

28/02/2023

0

PHP

}
.style6 {font-size: 12px}
.style7 {
font-size: 30px;
font-weight: bold;
}


<td><span class="style6">
<?=$cliente->status?>
</span></td>
Cairo Oliveira

Cairo Oliveira

Responder

Posts

28/02/2023

Frank Hosaka

<style>
.style6 {font-size: 12px}
.style7 {font-size: 30px;font-weight: bold;}
</style>
<?php
function teste($texto){
  if($texto=="venda"){$style="style7";} else {$style="style6";}
  echo "<table><tr><td class=$style>$texto</table>" ;}
echo teste("venda");
echo teste("frank");
Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar