Advertisement
Guest User

sds

a guest
Apr 3rd, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement