I would like to know how I can use php to get only the numeric value of this UOL image url link in this case only the 15516553 and highlight everything else I need to always take the numeric value always in the same position between / and -medium.
I would like to know how I can use php to get only the numeric value of this UOL image url link in this case only the 15516553 and highlight everything else I need to always take the numeric value always in the same position between / and -medium.
You can use regex
for this, eg:
$url = 'http://thumb.mais.uol.com.br/15516553-medium.jpg?ver=1';
preg_match("/^.*(uol.com.br\/)(\d+)-*/", $url, $valores);
echo $valores[2]; // seu id ficará na posição [2]
Output
15516553