phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


String: Creating Comma-Separated List from Array

Tag: string, array, implode   Category: PHP Basic
post: 03 Feb 2008 read: 465


PHP String: Previous post, we learn how to create array from comma separated list. Now return back. Create a string from array. We will return array('mango', 'orange', 'papaya', 'apple', 'pineapple', 'grape') become "mango, orange, papaya, apple, pineapple, grape".


$arr = array('mango', 'orange', 'papaya', 'apple', 'pineapple', 'grape');
$str = implode(", ",$arr);



| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
CAPTCHA - part 3 : "Are you human or ....?" (Build Your CAPTCHA)

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting