... that is turning out to be a brain teaser for me. I'm using the fopen command to create a new file and write some stuff in it, which is held in a variable. However, its returning a puzzling result.
Here is the code:
Code:
$contents = "http://www.loaded-designs.com/wuc/upload/$filename";
$file = "upload/$nameofm3u.m3u";
$open = fopen($file, "w+");
fwrite($open, $contents);
fclose($open);
then when I open up the new .m3u file, it reads as follows:
Code:
http://www.loaded-designs.com/wuc/upload/Array[name]
Any ideas why this would happen? It seems like it isn't processing the contents of the variable until after it inserts it into the .m3u. Thats just my thought, but any help is greatly appreciated!!!
Also another quick little question... I need to get rid of all blank spaces in a string... for example, lets say:
Code:
$variable = "$bandname $songtitle";
// $bandname = "Lamb of God";
// $songtitle = "New American Gospel";
is there a string fuction or any method to get rid of the spaces?
Thanks,
- Jeff Miller
www.loaded-designs.com