Hiya!
I want to write a piece of code to a file using fwrite, but I am having trouble storing php code in a variable. I keep returning errors like unexpected T_STRING tec.
$whileloop = '<?php while ($row = mysql_fetch_array($result)){echo "<a href=\"$row['PageName'].php"> $row['PageName']</a>\"}';
Is there a way to store PHP code in a variable, so it is not interpreted as php whilst in the variable, and then just written to a text file with the extension .php for processing later?
Cheers!