RE: Making array to string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
Hi, I'm new to PHP. I have an array that I would like to convert into a
string.

For example, I have

array(
0 => "Good morning",
1 => "Good afternoon",
2 => "Good evening",
3 => "Good night"
);

Now I would like to convert the array to something like:

"Good morning Good afternoon Good evening Good night".

The result has concatanation of each value, but has one space between
it.
If possible, I would like to insert something like "\n" instead of
space.

I've been looking into various "array" functions, but I have no clue
where to start.
[/snip]

http://www.php.net/implode


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux