Need a Website Or Web Application Or Any Help In Code , Contact Us: +91 9437911966 (Whatsapp), Note: Paid Service
Students Tutorial app relased. Download Now.

How to Split Date in PHP


<!DOCTYPE html>
 <html>
   <body>
<?php
$orderdate="23/10/2017";
$orderdate = explode('/', $orderdate);
$day   = $orderdate[1];
$month = $orderdate[0];
$year  = $orderdate[2];
echo $day."<br>";
echo $month."<br>";
echo $year;
?>
  </body>
 </html>
 

 <!DOCTYPE html>
 <html>
   <body>
<?php
$orderdate="23/10/2017";
$orderdate = explode('-', $orderdate);
$day   = $orderdate[1];
$month = $orderdate[0];
$year  = $orderdate[2];
echo $day."<br>";
echo $month."<br>";
echo $year;
?>
  </body>
 </html>