|
Posted by David Haynes on 04/06/06 03:52
Chris H wrote:
> see the problem is i really need the array values to come from a string
> variable, this way the administartor can easily set/modify the payout
> percentage "range" witrhin teh variables.php file, so the admin never has to
> be in the main parts of my code, i guess i could always just use mySQL and
> have the ranges set in a table for the scripts configs. altho i really am
> trying to keep from using MySQL so much to relieve any server strain
See that string in the explode function?
What's wrong with that?
How about this for clarity?
<?php
include_once('variables.php');
$table = explode(',', $range1);
printf("The first value is %f\n", $table[0]);
printf("The second value is %f\n", $table[0]);
?>
[variables.php]
$range1 = "0.60, 0.41, 0.20";
[Back to original message]
|