/    Sign up×
Community /Pin to ProfileBookmark

write php file in php

Hi, i’m trying to create a php with php.I know how to use fopen, fwrite & fclose but the file that i have to create is stored in a variable that contains mixed html and php (html written as $row.=”<table>blahblah</table> etc.. but i need php file because there is some dynamic content). If i use fopen, fwrite & fclose methods i receive this error?arse error: parse error, unexpected T_VARIABLE.
I suppose i had to skip() all the “(because it is intended as closing the string to write on the file) & $ in the HTML code but in this way i had to change all the function in the other PHP files that i have used in this file.
Some solutions?
Thanks
NB I have tried to echo this variable with echo and it prints perfectly my page

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@DARTHTAMPONMar 29.2007 — how about some code.

unexpected T_VARIABLE. usually means a simple syntax error so post you code and maybe we can further help you.
×

Success!

Help @perdido_hate spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...