Regular expression
Return list
if(isset( $date)){
if ( ereg( "([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})" , $date, $regs ) ) {
echo $regs[0] . "The conversion result is: " . $regs[3] . "-" . $regs[1] . "-" . $regs[ 2];
} else {
echo "The date format of $date is wrong!
";}}?>
http://www.bkjia.com/PHPjc/531918.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531918.htmlTechArticleRegular expression returns list if(isset($date)){ if ( ereg( "([0-9 ]{1,2})/([0-9]{1,2})/([0-9]{4})", $date, $regs ) ) { echo $regs[0] . " The conversion result is: " . $regs[3] . "-" . $reg...