title: How to convert multidimensional array to string in php
body: <p>I want to convert multidimensional array to string in PHP. For example, I have two arrays like array('540'),array('520').These two arrays are in a common array. I want to get the result as a string like '540,520'. I tried like the following and output is Array,Array. Implode function is not working because it is a multidimensional array.</p>
  
  <pre><code>$ids = array(array('540'),array('520'));
  for($i = 0; $i &lt; count($ids); $i++){
      $CT_IDS[] = $ids[$i];
  }
  echo implode(',',$CT_IDS);
  </code></pre>
  
  <p>How I get 540 and 520 as string output?</p>