downah Posted April 5, 2012 Share Posted April 5, 2012 Basically I have a date of birth field (date) now how would I go about splitting that date field into 3 variables $year $month and $day? Any small push forward is much appreciated, I have searched but it seems that I might not be putting it into words correctly. Actually while writing this I suppose I might of thought of the solution <?php $year = date('Y', strtotime($row['dob'])); $month = date('m', strtotime($row['dob'])); $day = date('d', strtotime($row['dob'])); ?> Would that be how you would go about it? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.