unexpected T_DOUBLE_ARROW when referring to an Array
<p>I think its because I am not referring to the array properly. I'm new to PHP so I faced this error.</p>

<p>On this line <code>$this-&gt;fields['id'] =&gt; &amp;$doc-&gt;id;</code></p>

<p><strong>Code is given for reference:</strong></p>

<pre><code>&lt;?php 

class Zoho{
    public $fields;

    public function __construct(){
    $this-&gt;fields = array(

    //  'content' =&gt; "@/wamp/apps/researchportal/tmp/a.doc",
        'apikey' =&gt; $this-&gt;api_key,
        'output' =&gt; $this-&gt;output,
    //  'id' =&gt; time(),
    //  'filename' =&gt; $usr_bin.'_!@#$%^&amp;^%$#@'.$usr_doc,
    //  'format' =&gt; $ext,
        'saveurl' =&gt; $this-&gt;save_url = $save_url,
        'mode' =&gt; $this-&gt;mode
    );

  }

    public function viewDocument(&amp;$doc) {

    $this-&gt;fields['id'] =&gt; &amp;$doc-&gt;id;
    $this-&gt;fields['filename'] =&gt; &amp;$doc-&gt;doc_name;
    $this-&gt;fields['format'] =&gt; &amp;$doc-&gt;doc_ext;
    $this-&gt;fields['mode']='view';
    $this-&gt;fields['content']='@'.&amp;$doc-&gt;path;

    }


}

    $document = new Document('C:/wamp/apps/researchportal/tmp/qubee.doc');
    $zoho_s = new Zoho('http://133.223.121.12/researchportal/common/save.php');
    $zoho-&gt;viewDocument();

?&gt;
</code></pre>
