Jump to content

PHP Parsing in Textarea


JREAM

Recommended Posts

I have an external file called block1.php,

I can load all the html in it fine, but the php parses when I load it into the textarea.

 

Does anyone know how I could keep it from doing that ONLY when it is in the textarea?

Because I want it to load everywhere else except the textarea.

 

if i do this:

str_replace('<', '[[', $file);
str_replace('>', ']]', $file);

 

Then when I reload it it has to be written kind of funny you know?

 [[php echo $test;]] 

then I could do

str_replace('[[', '<', $file);
str_replace(']]', '>', $file);

 

is that a bad idea?

is there a better way to do this? like eval($file) or something? Can anyone help

Link to comment
https://forums.phpfreaks.com/topic/123662-php-parsing-in-textarea/
Share on other sites

Archived

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

×
×
  • Create New...

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.