Hobbyist_PHPer Posted May 28, 2012 Share Posted May 28, 2012 Hi, can someone please help me with this seemingly trivial issue that I'm having... On my view & edit forms, I don't want to show float values that are <= 0 ... but no matter how I seem to write it, it won't work... I've tried the following <? if($row['ServicesPricePerMinute'] <= floatval(0.00)){echo '';} else {echo $row['ServicesPricePerMinute'];} ?> <? if($row['ServicesPricePerMinute'] <= 0){echo '';} else {echo $row['ServicesPricePerMinute'];} ?> Can someone please help me out? Link to comment https://forums.phpfreaks.com/topic/263270-if-var/ Share on other sites More sharing options...
Psycho Posted May 28, 2012 Share Posted May 28, 2012 Let's verify what $row['ServicesPricePerMinute'] really is. Try doing this var_dump($row['ServicesPricePerMinute']) Link to comment https://forums.phpfreaks.com/topic/263270-if-var/#findComment-1349227 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.