php Parse error: parse error, pending 'T_STRING' or 'T_VARIABLE' or 'T_NUM_STRING' in codeigniter?


I am having troubles reading XML, I followed this tutorial, and generated the code below.

When I open my controller I get

Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in C:\wamp\www\ci_doctrine\system\application\controllers\welcome.php on line 49

line 49 is foreach($xmlData['item'] as $row) I dont know what to do any idea, suggestions? help really appreciated

This is my code:


class Welcome extends Controller {

/*function Welcome()


function index()


    //load the parser library

           $data['title'] = 'Parsing XML using Simplexml class of CodeIgniter';

           $data['products'] = $this->_getXML('myxml');

       $this->parser->parse('table_view', $data);

        //$data['title'] = 'Parsing XML using SimpleXML class of CodeIgniter';


function _getXML($fname)

            $filename = $fname.'.xml';
            $xmlfile="“C:\wamp\www\" . $filename;
            $xmlRaw = file_get_contents($xmlfile);

            $xmlData = $this->simplexml->xml_parse($xmlRaw);

            foreach($xmlData['item'] as $row)

        $result .= '<tr>';
        $result .= '<td>'.$row['id'].'</td>';
        $result .= '<td>'.$row['name'].'</td>';
        $result .= '<td>'.$row['category'].'</td>';
        $result .= '<td>$ '.$row['price'].'</td>';
        $result .= '</tr>';

             return $result;

//End of file welcome.php
// Location: ./system/application/controllers/welcome.php 



    <category>Desktop Computers</category>

    <name>MacBook Pro</name>
    <category>Mobile PC</category>



    <name>Time Capsule</name>

    <name>Apple TV</name>

You've got a double quote on $xmlfile="“C:\wamp\www\"