How can I detect if a string ends with values inside an array?
array('.1.jpg','.2.jpg','.3.jpg','.4.jpg','.5.jpg','.6.jpg','.7.jpg','.8.jpg','.9.jpg');
the string can be: image.1.jpg or it can be image.11.jpg
But I need to find only if string ends with one the values inside the array.
preg_match('/\.[1-9]\.jpg$/', $string)