nichemtktg — 2012-03-20T10:56:36-04:00 — #1
Why does mktime() throw a notice when it acts on a variable?
Here's the notice I get: Notice: A non well formed numeric value encountered in E:\wamp\www\ est_120319.php on line 21. Please notice line 22 doesn't produce a notice.
line20: $temp = "28,41,20,19,03,2012";
line21: echo mktime($temp) . '<br />';
line22: mktime(28,41,20,19,03,2012) . '<br />';
logic_earth — 2012-03-20T11:00:15-04:00 — #2
Because that is not how it works. It doesn't take a string like that.
nichemtktg — 2012-03-20T11:03:24-04:00 — #3
Then whats the difference between line 20 and 22?
logic_earth — 2012-03-20T11:09:59-04:00 — #4
Its not obvious? Line 20 is a string. Line 22 is a function with arguments. You cannot take the arguments on Line 22 and put them into a string and expect it to work.
nichemtktg — 2012-03-20T11:16:27-04:00 — #5
No, it wasn't, but I knew I should know better when I sent my last post.
This was what I needed to see: mktime($sec,$min,$hr,$day,$mo,$year).
Thanks for making me think logic_earth.