Created
February 1, 2012 21:33
-
-
Save edwardteach42/1719597 to your computer and use it in GitHub Desktop.
Store Array to Database field as CSV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = array('value1', 'value2', 'value3'); | |
$comma_separated = implode(",", $array); | |
print $comma_separated; // value1,value2,value3 | |
//when you pull it back out, explode it, and then you will have your array! | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment