I have a variable $id
from URL parameter that contains a name ID-number like 1234.5Z
How can I use fopen
to write a file called 1234.5Z.json
?
I tried the following syntax:
$fp = fopen($id+'.json', 'w');
But I end up with a file named 1243.5