-2
My problem is that the $buy variable has different values with each while return, and I don’t know how I select which one is the smallest
  while($dados=mysqli_fetch_array($result)) {
        $idenc = $dados["id"];
        $produto = $dados["produto"];
        $qtd = $dados["qtd"];
        $fornecedor = $dados["fornecedor"];
        $compra = $dados["compra"];
         echo "<h3><tr>"
            . "<td><center>$qtd</center></h3></td>"
            . "<td><center>$produto</center></h3></td>"
            . "<td><center>$compra</center></h3></td>"
            . "<td><center>$fornecedor</center></h3></td>"
            . "<td><form method='post' action='operacoesenc.php'>"
            . "<input type='hidden' name='idenc' value='$idenc'>"
            . "<input type='text' name='compra' value='$compra'>"
            . "<input type='hidden' name='operacao' value='excluir'>"
            . "<input type='submit' value='Cancelar'></h3>"
            . "</form>";
    }
						
The $buy variable pulls the sql data and, as there is more than one product in the table, it is different with each While loop. I wanted to highlight the line where the $buy amount is lower, but I don’t know how to use min() and I don’t even know if this is the right way to do what I want. Somebody help me ?
– Alberto Sabino
Post your SQL command so we can guide you.
– anonimo