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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.