samedi 28 février 2015

if echo xxx -> echo xxx

This is my Code;


$output = curl_exec($ch); curl_close($ch); $temperatur = explode('T":', $output); echo substr($temperatur[1], 0, 4);


the echo substr gives me a number (e.g. 44). Is there a way in php to check if this number is under 50 and if yes, echo "blablaba".


I did something like this, but it wont work



$output = curl_exec($ch);
curl_close($ch);
$temperatur = explode('T":', $output);

$check = substr($temperatur[1], 0, 4);

if ($check < "50") {
echo "blabalabla";
}


Thank you for your help!


Aucun commentaire:

Enregistrer un commentaire