I\'m currently developing an online subscription application. I\'m having some challenges on the part where the user will select the Number of Days to subscribe and then the
Same result, shorter version:
function addDays($days,$format="Y-m-d"){ for($i=0;$i<$days;$i++){ $day = date('N',strtotime("+".($i+1)."day")); if($day>5) $days++; } return date($format,strtotime("+$i day")); }