neobadandy Posted January 19, 2010 Share Posted January 19, 2010 im goin crazy, it looks so simple, am i blind, why doesnt this work? <?php $c2=7; $T2=4; $T3=5; $NS = $T2 – $T3 / $c2 ; echo $NS; ?> Link to comment https://forums.phpfreaks.com/topic/188966-ahhhhhhhhhhhhhh/ Share on other sites More sharing options...
neobadandy Posted January 19, 2010 Author Share Posted January 19, 2010 doesnt use bedmas? Link to comment https://forums.phpfreaks.com/topic/188966-ahhhhhhhhhhhhhh/#findComment-997768 Share on other sites More sharing options...
Buddski Posted January 19, 2010 Share Posted January 19, 2010 What doesnt work about it? Errors? Incorrect total? We cant help fix it if we dont know whats wrong.. As far as code goes it looks fine.. After I tested your code I got a parse error.. I changed your 'minus' sign and it worked fine..?!? Where did you get that sign from? $c2=7; $T2=4; $T3=5; $NS = $T2 - $T3 / $c2 ; echo $NS; Works.. Link to comment https://forums.phpfreaks.com/topic/188966-ahhhhhhhhhhhhhh/#findComment-997771 Share on other sites More sharing options...
neobadandy Posted January 19, 2010 Author Share Posted January 19, 2010 wow yeah eh? i noticed that too, it's not a minus sign that's messed up... Link to comment https://forums.phpfreaks.com/topic/188966-ahhhhhhhhhhhhhh/#findComment-997773 Share on other sites More sharing options...
shlumph Posted January 19, 2010 Share Posted January 19, 2010 Yeah it's not a minus sign. Not sure what the heck it is. Anyways, it's always safe to use params when doing math Link to comment https://forums.phpfreaks.com/topic/188966-ahhhhhhhhhhhhhh/#findComment-997774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.