title: Change date format in php retrieved from mysql
body: <p>I have a column in mysql which stores the dates. So in mysql the dates are stored in <code>Y-M-D</code> format. However on retrieval i want to view change that format to <code>D-M-Y</code> . I read online at a few places and i found the date() in php, <a href="https://stackoverflow.com/questions/7357461/format-a-mysql-date-in-php">Date conversion</a>. But they are generally for timestamp, also in many cases people had recommended to split the variable by <code>-</code> and then changing position. </p>
  
  <p>My question is that, is splitting the variable the only option here or do we have any built in function that does that for us?</p>