I have one string like 8/29/2011 11:16:12 AM. I want to save in variable like $dat = '8/29/2011' and $tme = '11:16:12 AM'
How to achieve that? Can you give me example?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
E.g.
see http://docs.php.net/class.datetime
edit: To keep the AM/PM format use