htmlnoobie3344 Posted March 22, 2010 Share Posted March 22, 2010 Hey, i've been trying to learn PHP lately and i want to try putting a script in it's own PHP file with out HTML tags, but then how do i include it in the HTML? i found something like: <!--#include file="PHP scripts/trial.php" --> but i don't know how to access the variables, i even read the PHP tutorials on w3 and still not getting it, maybe someone could explain it to me better? my friend ever tried but i'm just not getting it :-p Link to comment Share on other sites More sharing options...
Synook Posted March 22, 2010 Share Posted March 22, 2010 You use the include statement (your snippet is SSI syntax): <?phpinclude("file-to-be-included.php");?> Then it is as if you've copied and pasted the included file into the main document. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.