How to slipt a date which is already stored in a database using php -


I have created a database table using mysql.there. I store the date using the date picker. If I want to assign that archive date to three variables named $ Year, $ month and $ day, how can I differentiate using php?

  Table name ----> Vehicle Meters Table Field ---- & gt; Date, Vehicle_, Meters, Status Question ---- & gt; $ Selectdate = mysql_query ("Choose date from vehicle meter where position = '1'"); $ R = mysql_fetch_array ($ Selectdate); $ Date = $ r ['date'];   

If $ $ is excluded from the named variable, then 2006-08-21

I want to separate it as three variables. Must be in 2006, $ month 08 and $ day 21. How can I do this?

Please help ...

your $ date , and use, such as:

  list ($ year, $ month, $ day) = explosion ("-", $ date); Echo every year "& Lt; br />".$month."<br/>".$day;    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -