In my php code I have an array of variables starting with a word followed by an (random) number:
x[0] = 'justaword8'
x[1] = 'justaword5'
x[2] = 'justaword4'
etc.
I know i must use a foreach loop, but how to extract the figures at the end of each word? (I assume I could use preg_match() but have no idea how specify that function exactly?)