forcer Posted June 27, 2008 Share Posted June 27, 2008 I have some variables in a seperate PHP file that i want to call/echo into my main php file.. example.. in vars.php i want to call $variable = "whatever..."; into index.php i would use <?php echo $variable; ?> but with it being in a seperate file... would i just use <?php include("vars.php"); ?> at the top of index.php sorry about the noob question, i'm also not in my testing environment at the minute.. so i havent been able to test it. thanks Link to comment https://forums.phpfreaks.com/topic/112165-simple-php-include-question/ Share on other sites More sharing options...
waynew Posted June 27, 2008 Share Posted June 27, 2008 Just use: include("vars.php"); Should work fine. Link to comment https://forums.phpfreaks.com/topic/112165-simple-php-include-question/#findComment-575820 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.