View Single Post
Old 01-19-2011, 03:39 AM   #2 (permalink)
tony
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

try this:

test.php
php Code:
test

index.php
php Code:
<?php
$test = 'something';
$new = trim(file_get_contents('test.php'));
$echo $$new,"\n";

that should work, because of how PHP look up variables and it lets you declare variable variables
tony is offline  
Reply With Quote