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 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. 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
Archived
This topic is now archived and is closed to further replies.