- Forums
- PHP
- How To Make All The Element Sin An Array Into A Single String In Php
This Page Contains information about How To Make All The Element Sin An Array Into A Single String In Php By wallpaperama in category PHP with 0 Replies. [1252], Last Updated: Sat May 18, 2024
wallpaperama
Fri Feb 13, 2009
0 Comments
359 Visits
ok, lets say you are like me, and you have an array in php but then you want that array to be made into a single string. this is what i mean.. for example lets say i have this array:
$ArrayString = array("wallpapers","screensavers","pictures");
so to get the values of $ArrayString and put them into one string you can use the implode() function in php like this:
$ArrayString = array("wallpapers","screensavers","pictures");
$ArrayString = implode(",",$ArrayString);
now the value of $ArrayString is going to be
wallpapers screensavers pictures
hope thats what you were looking for