So heres what i have. I have an array of $_POST elements and some end with a number, some do not. So whatI have already is:
foreach ($_POST as $field_name => $value){ }
What id like to do it put an if statement within the foreach, and say ‘if $field_name contains a number, save that number in a variable $num’. And then foreach $field_name that contains that same $num, do this…
Im pretty clear on the concept, but not the actual code. The first step would be to determine if the the field contains a digit 1-9 within it. Any suggestions?
Use
preg_match!(Edit: simplified)