get all from the string which is between the tags and use the substring with eval();
Best regards, Andrey Hristov ----- Original Message ----- From: "neko" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 5:42 AM Subject: [PHP] resolving php tags in a string > I have a question: I normally use include to include a file, which often has > php tags that are then interpreted and resolved. > > However, in one case I am reading a text file into a string (fread), then > running nl2br() on it to present it (with an echo command). > > However, I wish to also resolve any php tags, which obviously aren't in this > case and are just presented in the browser as plain text. > > What's the best way to solve this one? First thought was to write it to a > temporary file and then call an include on that, but that sounds plain bad. > > neko > > -- > "The secret of genius is to carry the spirit of the child into old age, > which means never losing your enthusiasm." > -- Aldous Leonard Huxley > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php