preg_match - Regex


$description = [pagebuilder id=12]

$reg_exUrl = "#\[pagebuilder\s*id=\"(\d+)\"\s*\]?#";

 if( preg_match( $reg_exUrl, $description, $match ) ){                             

                $desc_cat = $match[1] ;

}

Comments

Popular Posts