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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn