Skip to content
Advertisement

Parse string containing range of values to min and max variables

I’m looking for a nice way to parse a string into two variables using PHP. The variables are called minage and maxage, and they should be parsed according to the examples below:

JavaScript

Advertisement

Answer

Try this:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement