Here is what I am doing: I am reading in the contents of a text file that contains variables whose properties I want to output. So, as was suggested on the list I used the following:
eval("\$rest = \"".addslashes($pre_rest)."\";"); This works quite well, with one problem: if I use a contraction, like won't, it will output as won\'t. So, I tried changing it to a backtic (`) in the text file and after the eval statement, the output was won`t. So, I thought I had it. I added: ereg_replace("'", "`", $pre_rest); before the eval statement. However, the output then became won\`t. I don't understand why it is that changing quote to backtic in the text file will give me the proper output, but the ereg_replace, which should provide the same input to the eval statement, gets the slash added. Does anyone have any ideas on why this is happening, and what I can do to avoid the quote being slashed? -- Ian Truelsen Email: [EMAIL PROTECTED] AIM: ihtruelsen Homepage: http://www.ihtruelsen.dyndns.org Signature key (742B740D) available at pgp.mit.edu
pgp00000.pgp
Description: PGP signature