my input string: dd.mm.yy
With php, how can i extract yy?
example
input = 17.03.19 (dd.mm.yy)
output: 19 (yy)
thank you
CodePudding user response:
<?php
// Your input
$input = "17.03.19";
// Explode with that separator
// $temp[0] will contain : 17
// $temp[1] will contain : 03
// $temp[2] will contain : 19
$temp = explode(".",$input);
$output = $temp[2];
echo $output;