PHPBuilder - converting a PHP array into a string



RSS Twitter
Snippets Algorithms

converting a PHP array into a string

by: shwank
|
February 8, 2007

Version: 0.7

Type: Function

Category: Algorithms

License:

Description: 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.



<?php

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

?>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
shwank

Comment:



Comment:

(Maximum characters: 1200). You have characters left.