Jump to content

PHP - Load html page dynamically


idforedu

Recommended Posts

when you mean dynamically, do you mean you want stuff to load when a button or link is pressed? if so, then look into AJAX.

 

otherwise if you just mean grab HTML and display it. You can either grab a html file. Or display the HTML in PHP.

 

grabbing the html file:

<?php
include("htmlfile.html");
?>

 

display HTML in PHP:

<?php
echo <<<_HTML
<h1>My HTML</h1>
_HTML;
?>

 

Regards ACE

when you mean dynamically, do you mean you want stuff to load when a button or link is pressed? if so, then look into AJAX.

 

otherwise if you just mean grab HTML and display it. You can either grab a html file. Or display the HTML in PHP.

 

grabbing the html file:

<?php
include("htmlfile.html");
?>

 

display HTML in PHP:

<?php
echo <<<_HTML
<h1>My HTML</h1>
_HTML;
?>

 

Regards ACE

 

i want to load contents dynamically on the html page. can u plz help me out where i can find sample code?

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.