SHARE
TWEET

sds

a guest Apr 3rd, 2013 102 Never
  1. $cities = array('Tokyo', 'Mexico City', 'New York City', 'Mumbai', 'Seoul', 'Shanghai', 'Lagos', 'Buenos Aires', 'Cairo', 'London');
  2.                
  3.                 echo "<h2>Array to string separated by comma</h2><br>";
  4.                 foreach ($cities as $result) { 
  5.                     $string = $result. ', ';
  6.                         echo $string;
  7.                 }
RAW Paste Data
Top