Jump to content

[SOLVED] problem with match_preg_all


ciber

Recommended Posts

I am busy creating a function to grab data from YouTube's API, but the one thing for the title is not grabbing any data. I am using a preg_match_all, and I think there is something wrong with my pattern:

 

  $pattern = '<title type=\'text\'>(.*)</title>';
  if(preg_match_all($pattern, $data, $title)) {$title = $title[1][0];}

 

can anyone see anything wrong?

Link to comment
https://forums.phpfreaks.com/topic/138147-solved-problem-with-match_preg_all/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.