Jump to content

[SOLVED] Execute php without echoing


newbtophp

Recommended Posts

I have some code, and im using echo to print the code. The problem is it just prints the code.

 

I've looked at alternatives such as print() and highlight_string()

 

But they all print the code and not execute then print.

 

How would i execute/run the code.

 

For example:

 

$string = '<?php print "hey people"; ?>';

echo($string);

 

Would just echo: <?php print "hey people"; ?>

 

When i want it to look like:

 

hey people

Link to comment
https://forums.phpfreaks.com/topic/174946-solved-execute-php-without-echoing/
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.