View Single Post
  #98 (permalink)  
Old 08-28-2007, 07:48 AM
Sabari Sabari is offline
D-Web Genius
 
Join Date: Jul 2007
Posts: 1,008
Sabari is on a distinguished road
Default Re: Using Arrays in PHP

converting a PHP array into a string

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('W','E','L','C','O','M','E');
$string = implode($arr, '');
echo $string;

?>


Output:

WELCOME
__________________
Thanks & Regards
Sabari...
Reply With Quote