title: Split String contain Brackets in PHP
body: <p>I have string like following format:</p>
  
  <pre><code>$string ='[(id,name,top,left,width,height,depth)filename|filename][(id,name,top,left,width,height,depth)filename|filename]';
  </code></pre>
  
  <p>I want to extract string for square and simple bracket and result set would be like</p>
  
  <pre><code>[0] =&gt;(id,name,top,left,width,height,depth)
  [1] =&gt; filename
  [2] =&gt; filename
  </code></pre>
  
  <p>How can i do it? I have tried below code:</p>
  
  <pre><code>explode("[" , rtrim($string, "]"));    
  </code></pre>
  
  <p>But not working properly.</p>