Ok. I have this data.php file with and array that looks something like this:
<?
$data=array(
array('date'=>'8752664',
'poster'=>'Icy',
'tag'=>'Comment test.',
),
array('date'=>'3333333',
'poster'=>'Robot',
'tag'=>'r0b0t is cool.',
)
);
?>
And I have this other script, minitag.php,this is what the script basicly does:
It include data.php, prints a form, take the form input and puts it into the $data array, opens data.php for writting and tries to write the $data array in it.
The problem is that this does not work because when I do this:
fputs($fp,'<?'.$data.'?>');
all I get in the data.php file is <?Array?>
So what I need is a function that converts the array into a string, keeping the same format so that I can write the array to the file.
I've tried many things all unsuccessful, $array=(string)$array did not change a thing, I've tried serializing but it did not seem to work..and finally I do not want to use implode and explode, I want the array to be written to the file in the format shown above.
Please help.