MysticFallout
10-18-2002, 08:14 PM
i have an external script called vars.php which holds variables like
$bgcolor = '#000000';
$header_text = "Welcome Home";
and so on. what i want to do is pull each line into an array to put the value of each variable into a txt box for user editing. i know how to rewrite this info to the file, but i still havent been able to pull the values into an array. i have tried:
Code:
$vars = implode(" ", file("vars.php"));
echo "$vars[0]<br />$vars[1]";
but that pulls <?php in as the vars. can anyone point me at least in the right direction? id like to use MySQL for this, but i havent got it enabled at my host yet. plus my friend who will use this script also doesnt have MySQL accessibility at all :(
$bgcolor = '#000000';
$header_text = "Welcome Home";
and so on. what i want to do is pull each line into an array to put the value of each variable into a txt box for user editing. i know how to rewrite this info to the file, but i still havent been able to pull the values into an array. i have tried:
Code:
$vars = implode(" ", file("vars.php"));
echo "$vars[0]<br />$vars[1]";
but that pulls <?php in as the vars. can anyone point me at least in the right direction? id like to use MySQL for this, but i havent got it enabled at my host yet. plus my friend who will use this script also doesnt have MySQL accessibility at all :(