How can I check for equal variables within a while?
- Type if there are lines as the same CODE do something ...
Low I put my example
$bd = new MySQLiConnection();
$sql3 = $bd->prepare( "SELECT * FROM agenda_saidas WHERE id_transfer = ? ") or exit( $mysqli->error );
$sql3->bind_param('i', $id_transfer);
$sql3->execute();
$resultcar = $sql3->get_result();
while( $row = $resultcar->fetch_assoc() )
{
$os = $row['os'];
$nome = $row['nome'];
$data = $row['data'];
if(// se $os duplicado ){
$corlinha ='red';
}else{
$corlinha ='white';
}
Example: Imagine these lines down