function preg_match_all

0

I have this function:

preg_match_all('/(tvg-logo="(?<logo>.*?)".+group-title="(?<name>.*?)".+\n(?P<link>http?:\/\/.+))/', $response, $channels, PREG_SET_ORDER);

It scans a m3u8 list:

EXTINF:-1  tvg-logo="https://image.tmdb.org/t/p/w600_and_h900_bestv2/rHPGCpqsbg3WK90uig0KbxBtFrh.jpg" group-title="Vod! Ondemand!",Jumanji: Bem-Vindo à Selva (2017) - Dublado - 720p
http://cdn1.ntcdn.us/content/httpdelivery/filmes2018/JUMANJI2018DUB-ALTO.mp4

And it displays information with this code:

foreach($channels as $channel): ?>
<li class="list-group-item">
    <a href="<?php echo $channel["link"] ?>" title="<?php echo $channel["name"] ?>">
        <img src="<?php echo $channel["logo"] ?>" class="img-responsive img-circle" />
        <div id="info_bar">
          <?php echo $channel["name"] ?>
        </div>
    </a>
</li>
<?php endforeach; ?>

I just need to get the name information, which is after the commas of group title.

    
asked by anonymous 20.03.2018 / 18:25

0 answers