I'm currently working on parsing an RSS feed. I've gotten the data I need no problem, and all I have left is parsing the game title.
Here is the code I currently have (ignore the sloppiness, it is just a proof of concept):
$url = 'http://edureka.co';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$xml = new SimpleXMLElement($result);
$lastgame = $xml->channel->item->description;
preg_match('[a-zA-Z]+</a>.$', $lastgame, $match);
Everything was working great, but then I started getting this error:
Warning: preg_match() [function.preg-match]:
Unknown modifier '+' in raptr.php on line 14
The only thing I have left is to strip out the closing anchor tag and the period, but I can't seem to figure out why it isn't liking the '+'. Any ideas?