Is there a good way to populate an iframe using PHP?
I have a variable, say $source in PHP that has a full HTML (e.g. <!DOCTYPE
html> <html><head><meta charset="utf-8">...). Is there a way I can create
an iframe and populate it with the $source variable using PHP? If not, is
there a smarter way to do this with a JavaScript+PHP combo?
PHP code...
$source = "<!DOCTYPE html> <html><head>...";
echo '<iframe></iframe>'; // Show the content of the variable $source in
this iframe
No comments:
Post a Comment