How do you format a dynamic variable in PHP?

I am trying to format a dynamic variable from my SQL query. How do I do that? My variable is.

$event_result['start_date']
LVL 2
kallestieAsked:
Who is Participating?
 
Vel EousConnect With a Mentor Research & Development ManagerCommented:
You mean date format?

echo date ( 'Y-m-d', mktime ( $event_result['start_date'] ) );
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
format how?
0
 
glcumminsCommented:
You can use the PHP date() function to format dates. For more information, please see http://www.php.net/date and http://www.php.net/strtotime .
0
 
kallestieAuthor Commented:
Thank you!!! :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.