How to print only the value of group 2 in preg_match_all without the array and without loops
$url = 'https://hentaifox.com/gallery/58091/';
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
preg_match_all('!<a href="\/tag\/(.*?)\/"><span class="badge tag">(.*?)<\/span><\/a>!', $result, $tags);
I only want (.*?) result to use it any where