Jump to content

Archived

This topic is now archived and is closed to further replies.

Webnerdz

$filename=$variable

Recommended Posts

I know the answer is probably right in front of me, but I just cannot figure it out. Can anyone please help me with the syntax here:

if ($i==1){$filename='$crpage';}

$crpage is the variable called from the previous page. When it creates the file it creates a file called $crpage.html in the directory. I just need to figure out why it doesn't create the name that is entered in the form for the $crpage variable.

Thank you all in advance for any assistance you can provide!

Share this post


Link to post
Share on other sites
Either use double quotes (") or no quotes at all. Anything enclosed in single quotes is taken as a literal string.

Ken

Share this post


Link to post
Share on other sites
[!--quoteo(post=369348:date=Apr 27 2006, 03:32 PM:name=Webnerdz)--][div class=\'quotetop\']QUOTE(Webnerdz @ Apr 27 2006, 03:32 PM) [snapback]369348[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I know the answer is probably right in front of me, but I just cannot figure it out. Can anyone please help me with the syntax here:

if ($i==1){$filename='$crpage';}

$crpage is the variable called from the previous page. When it creates the file it creates a file called $crpage.html in the directory. I just need to figure out why it doesn't create the name that is entered in the form for the $crpage variable.

Thank you all in advance for any assistance you can provide!
[/quote]

Umm, I'm not sure if I understand what you mean but here

[code]if ($i==1){$filename="'$crpage'.html" }[/code]

Try that

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.