Ins: basic output

Back to Ins homepage

next

To display PHP variable, use them just like in PHP, just without angle brackets. If you don't wish to interpret the data, escape the dollar with backslash. We loaded this script this way
include "ins.php"; $file = file_get_contents("01-output.html"); $data = []; $data["x"] = "<b>bold</b>"; echo ins($file, $data);
Then the HTML was altered this way
This is dollar x: \$x This is escaped data: $x This is unescaped data: $$x

Result

This is dollar x: $x

This is escaped data: <b>bold</b>

This is unescaped data: bold