Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $cities = array('Tokyo', 'Mexico City', 'New York City', 'Mumbai', 'Seoul', 'Shanghai', 'Lagos', 'Buenos Aires', 'Cairo', 'London');
- echo "<h2>Array to string separated by comma</h2><br>";
- foreach ($cities as $result) {
- $string = $result. ', ';
- echo $string;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement