How to convert MySQL datatype names into regular expressions using php?

cacca

New Member
Is there a php function to get regular expressions able to check if an input fits a certain MySQL data type?In example:\[code\]$foo = get_regex_for_data_type("int(10) unsigned");echo $foo;\[/code\]would return something like:\[code\]/^[0-9]{1,10}$/\[/code\]
 
Back
Top