I need help using quotes on PHP.
I have this code:
And what I want is to set all that code as a variable.
But I can't because of the double quotes! And if I use single quotes then the code won't work.
What I have is this:
You can see... I have plenty of double quoutes there...
Is there any way of doing this?
I have this code:
Code:
<?php $myfile = "$xxx.txt"; $work = fopen ($myfile, "r"); $hits = fread ($work, filesize($myfile)); fclose ($work); echo "xxxx: <b>$hits</b>";?>); $filenameb = "stats.php"; $fdb = fopen ($filenameb, "a"); fwrite ($fdb,$contentsb); fclose ($fdb); ?>
But I can't because of the double quotes! And if I use single quotes then the code won't work.
What I have is this:
Code:
$MYVARIABLE = " <?php $myfile = "$xxx.txt"; $work = fopen ($myfile, "r"); $hits = fread ($work, filesize($myfile)); fclose ($work); echo "xxxx: <b>$hits</b>";?>); $filenameb = "stats.php"; $fdb = fopen ($filenameb, "a"); fwrite ($fdb,$contentsb); fclose ($fdb); ?> ";
Is there any way of doing this?
Comment