Change Date Format

  <?php   
  $date = "18/11/2015";   
  $change_date = str_replace('/', '-', $date);   
  echo $result_date = date('Y-m-d', strtotime($change_date));   
  ?>   
  //output:   
  2015-11-18   

Comments

Popular posts from this blog