Hi..
I am retrieving my sql array like so:
$sql = select etc..
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
then extracting the array like so:
foreach ($row as $key => $value){
$$key = $value;
}
This works fine when I place this in the actual file, but if I try to put the SQL and the foreach into a seperate include, I cannot use any of the variables. :bemused:
I was making the above in to a function, and passing the $customer_id to the '$sql =' bit.
Do I need to, for instance, 'return ($value)' or something ?
Its got me a little confused..
This is for a project where I have about 50 forms that I need to auto-generate and populate RTF versions of, so I thought it would be an ideal candidate for 'include'.
Thanks in advance 🙂
Mike.