problem accessing to a variable in object

clevercat

New Member
Edit: this is part of main function to call the grab function:\[code\] $video['type'] = $videoProvider; $video['id'] = $videoIds; $video['title'] = $this->grab_title_from_curl($data);\[/code\]I have this little function to parse title from html via curl, it works.\[code\] private function grab_title_from_curl ($pull){ preg_match("/<meta name=\"title\" content=\"(.*?)\"/", $pull,$data) ; return $data; }\[/code\]and shows me this:\[code\]Array( [type] => yahoo [id] => 613478/2923165 [title] => Array ( [0] => EXELENTE TIRO DE ARCO!! ))\[/code\]I need to [title] directly gets the value of [0] in the array.like: [title] => EXELENTE TIRO DE ARCO!!second edit:for some reason the code breaks when i use JoostK's code: pastie.orgsorry for my bad english! SOLVED: instead of preg_match("/
 
Back
Top