I have a string like "padding: 0px 0px 0px 0px".
The digits are however unknown so the can be 0, 5, 10, 25, 100 or whatever…
What’s the best way to extract each of those to a variable?
(i.e.
$number1 = first number
$number2 = second number
$number3 = third number
$number4 = fourth number)
Haljan,
This should work:
It matches all numbers that are followed by a “px” and writes them to $matches.