pallavi Posted September 7, 2022 Share Posted September 7, 2022 when i run this code then - sign display but i don't have the minus sign <span><sup>₹</sup><?php echo $valPlan['pricing']['prefix'];?></sup> <?php echo round(($valPlan['pricing']['INR']['triennially']*0.4)-($valPlan['pricing']['INR']['triennially']));?> </span> Quote Link to comment https://forums.phpfreaks.com/topic/315287-php-code-ckecher/ Share on other sites More sharing options...
requinix Posted September 7, 2022 Share Posted September 7, 2022 The minus sign will also show up when a number is negative. Quote Link to comment https://forums.phpfreaks.com/topic/315287-php-code-ckecher/#findComment-1600204 Share on other sites More sharing options...
pallavi Posted September 7, 2022 Author Share Posted September 7, 2022 yaa but i don't have minus sign soo any solution to remove minus sign Quote Link to comment https://forums.phpfreaks.com/topic/315287-php-code-ckecher/#findComment-1600206 Share on other sites More sharing options...
requinix Posted September 7, 2022 Share Posted September 7, 2022 If there is a minus sign then either (a) the "prefix" is a minus sign or (b) your rounded number is negative. There's no way for me to know which one based on what you've posted. Quote Link to comment https://forums.phpfreaks.com/topic/315287-php-code-ckecher/#findComment-1600207 Share on other sites More sharing options...
pallavi Posted September 7, 2022 Author Share Posted September 7, 2022 \ how to solve??? <div class="select-option best-smart-menu-1" id="3mo">3 mths @ <span><sup>₹</sup><?php echo $valPlan['pricing']['prefix'];?></sup> <?php echo round(($valPlan['pricing']['INR']['triennially']*0.4)-($valPlan['pricing']['INR']['triennially']));?> </span> <span>/ mo</span> </div> Quote Link to comment https://forums.phpfreaks.com/topic/315287-php-code-ckecher/#findComment-1600208 Share on other sites More sharing options...
Solution Barand Posted September 7, 2022 Solution Share Posted September 7, 2022 Have you thought about subtracting the smaller number from the larger one? 1 Quote Link to comment https://forums.phpfreaks.com/topic/315287-php-code-ckecher/#findComment-1600210 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.