Re: Issue saving php that includes constant---

From: Date: Wed, 12 Feb 2003 10:01:51 +0000
Subject: Re: Issue saving php that includes constant---
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135287@lists.php.net to get a copy of this message
You need to make it a string, so echo '"To "._LOGIN." click the login link below";'; still I'm not sure this is what you want Shawn McKenzie wrote:
I collect some PHP code in an HTML form (textarea) I then save this in an array in a file using export_var(). If the code entered in the textarea is this: echo "To "._LOGIN." click the login link below"; And the constant _LOGIN happens to be defined in the current script that generates the form (maybe _LOGIN = "Login" ), then the result after my var_export() to the file is this: $var = 'To Login click the login link below";'; Any ideas on how to keep the text of the constant definition in the string instead of it being evaluated??? TIA, Shawn


« previous php.general (#135287) next »