#native_company# #native_desc#

converting a PHP array into a string

By shwank
on February 8, 2007

Version: 0.7

Type: Function

Category: Algorithms


This simple function converts a PHP array to a string containing a PHP array declaration. It can be used to put an array into a database field. It can then be retrieved and eval()’d in another script.


$arr = array('h','e','l','l','o');
$string = implode($arr, '');