title: file put contents with array
body: <p>I am using <code>file_put_contents($file, $data);</code> function for putting contents in file, because these files are created on fly with name of sessions, <strong>$data</strong> is an multi-dimensional array, when i am echoing array it prints out fine but in file no contents get recorded except the word <strong>Array</strong></p>
  
  <p>What should i do or is there any other function which automatically creates the file and records the data (array)?</p>
  
  <p>Thank You.</p>