I am trying to echo a specific message if the numerical value of $mqmtxt is greater than 20.
The value is in a txt file, the value is 7 so should be showing NO WARN but is showing WARN. Not sure what I am missing here.
<?php
$mqmtxt = file_get_contents("./MQM/mqmcount.txt");
$mqmtxt = preg_replace('/[\x00-\x1F\x7F-\xFF]/', '', $mqmtxt);
if ($mqmtxt >= "20"){
$mqmwarning = "WARN";
}else{
$mqmwarning = "NO WARN";
}
?>
<!DOCTYPE html>
<html>
<body>
<div id="dispmqmcount"><?php echo $mqmtxt; ?></div>
<div id="warning"><?php echo $mqmwarning; ?></div>
</body>
</html>
var_dump($mqmtxt);?