Webnerdz Posted April 27, 2006 Share Posted April 27, 2006 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! Link to comment https://forums.phpfreaks.com/topic/8577-filenamevariable/ Share on other sites More sharing options...
kenrbnsn Posted April 27, 2006 Share Posted April 27, 2006 Either use double quotes (") or no quotes at all. Anything enclosed in single quotes is taken as a literal string. Ken Link to comment https://forums.phpfreaks.com/topic/8577-filenamevariable/#findComment-31440 Share on other sites More sharing options...
drdysdy Posted April 28, 2006 Share Posted April 28, 2006 [!--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 Link to comment https://forums.phpfreaks.com/topic/8577-filenamevariable/#findComment-31507 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.