I'm new to PHP, and I'm sure this is a noob question, but after searching everywhere, I have to resort to asking... I have a variable who's value is 5 randomly generated numbers: $random I want to create/open a text file that includes that variable in the name... Ideally, to me, the open line would be something like this: $file1 = "file1-$random.txt"; $fhhw = fopen($health1, \'w\') I can't seem to get the syntax right on how to insert a variable into the text file's filename that I am trying to create... Can anyone advise? Meissa
Yes, that is what I'm trying to do... and I've done that... maybe I had some simple syntax error and assumed that the way I was trying it wasn't working... My wanted end result is this: Did it name the file it created ---> file1-111.txt?
Wow... (after trying your example)... Thanks for the pointer... I don't know why it didn't work for me the first time I tried it... /shrug... /cheers! ^_^