title: How to write $ symbol to file using fwrite command in php
body: <p>Iam trying to create a file having an array declaration by using the following code. But the variable name is not coming to the resultant created page.</p>
  
  <pre><code>function createFile($fname,$code){
      $fp=fopen("products/".$fname,"w") or die("Can not open file");
      fwrite($fp,"&lt;?php   
          $pageeInfo[productcode]=".$code.";
          ?&gt;");
  
  }
  </code></pre>