PHP Questions Home
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I turn an array into a string?


If you explode to go one way, then you implode to come back the other way (or use join if you want to type less characters).

Just use the delimiter as the first argument and the array as the second.

Here we go:

<?php
$myarray 
= array("I","love","washing","up");
$mystring implode(" "$myarray);
echo 
"$mystring";//I love washing up
?>



ASK A QUESTION

More arrays PHP Questions

I have an array of numbers and many repeat, how to list all items in order of maximum occurence?

How can I create an array of the letters of the alphabet?

HOW CAN I DELETE ALL THE ELEMENT OF THE ARRAY

How do I find if a value is already in an array or not?

in .$array->description doesn't work "description" is suppose to stay black and turns colored and is ignored Why?



Custom Search