Jump to content

strtotime() no result


MasterACE14

Recommended Posts

Good Day,

 

I'm struggling to get strtotime() to return anything.

 

I have the following code..

$fields['birth']['day'] = 9;
        $fields['birth']['month'] = 7;
        $fields['birth']['year'] = 1982;
        $dob = $fields['birth']['day'].' '.$fields['birth']['month'].' '.$fields['birth']['year']; // Returns: 9 7 1982
        $dob = strtotime($dob); 
        die($dob);

 

No matter what I do $dob isn't returning anything once strtotime() is used. I've tried matching my day/month/year 's with examples in the manual on the strtotime() page but using date() on the fields, but it still doesn't want to return anything.

 

I feel I'm missing something simple here.

 

Any help is appreciated.

 

Regards,

Ace

Link to comment
https://forums.phpfreaks.com/topic/249302-strtotime-no-result/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.