Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialcodingwithcats
3,564 Pointsvar_dump($day); returning PHP Warning: date() expects at least 1 parameter, 0 given
Hi all,
This seems like a super silly step to get stuck on, but I can't work out where I've gone wrong.
When I try running var_dump($day) I get the following message in my console:
PHP Warning: date() expects at least 1 parameter, 0 given in /home/treehouse/workspace/exercise.php on line 15
I've tried the following with no luck: *including date_default_timezone_set() function *changing 'N' to 'D'
Can anyone help?
1 Answer
codingwithcats
3,564 PointsHi Dave,
Thanks for taking the time to reply. The screenshot showed up differently than the version of the workspace I was looking at - date () vs date('N') - when I closed and re-opened it worked just fine. Think it may have been something as simple as forgetting to save! facepalm
Kind regards, Clarissa
Dave StSomeWhere
19,870 PointsDave StSomeWhere
19,870 PointsAre you trying that from your exercise.php?
Your code is invalid: