MrTIMarshall Posted March 17, 2013 Share Posted March 17, 2013 Hello, I need to shwo $percent if it is below 0.10 to be 0.01 for example. case $timenow < $todayInfo['sunrise']: // is it pre-sunrise // get last night's sunset $nighttime = true; $yesterdayInfo = date_sun_info(strtotime('-1 days', $today), $lat, $long); $percent = round(($timenow - $yesterdayInfo['sunset'] )*100/($todayInfo['sunrise'] - $yesterdayInfo['sunset'])); break; Thank you fro any help and/or advice in advanced,. Best Regards, Tim Quote Link to comment https://forums.phpfreaks.com/topic/275782-instead-of-01-how-to-show-as-001/ Share on other sites More sharing options...
MrTIMarshall Posted March 17, 2013 Author Share Posted March 17, 2013 This is now fixed. Quote Link to comment https://forums.phpfreaks.com/topic/275782-instead-of-01-how-to-show-as-001/#findComment-1419172 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.