How can I convert an array to a string to then fwrite it to a flat file? I have a file which I'm reading then getting rid of dupes and would then like to write to a different file with no duplicates. TIA.
See this exemple:
<? $array[0] = "PHP"; $array[1] = "Builder"; $array[2] = ".com";
$phpBUilder = join("",$array);
echo "$phpBUilder";
echo "<BR>OR<BR>";
$phpBUilder = join(" ",$array); // change the firt param. as you need.
?>
That's just what I needed. Thank you!
Also, You can also use the serialize() and unserialize() functions.... You can convert any PHP variable to a string for storage with serialize(), then convert it back with unserialize().
http://www.php.net/manual/en/function.serialize.php http://www.php.net/manual/en/function.unserialize.php
-JoshB
OK.