Thanks for your help Laserlight...I woulnd't have even thought of looking for variable variables.
I finally sorted it, but because I've had to redo the function to dynamically access the global variables for each item of the form I'll be creating.
Noods....
if anyones interested heres the final script:
<?php
$myarray=array(
"title"=>"Form number 1",
"var1"=>"myvar1",
"var2"=>"myvar2"
);
$myarray2=array(
"title"=>"Form number 2",
"var1"=>"myvar3",
"var2"=>"myvar4"
);
$myvar1="hello";
$myvar2="hellsdado";
$myvar3="this is a test";
draw_input($myarray,"var1","myvar1");
draw_input($myarray,"var2","myvar2");
draw_input($myarray2,"var1","myvar3");
function draw_input($frm,$gbs,$vlus){
global ${$vlus};
$vr1=$frm[$gbs];
echo "<input type='input' value='" . ${$vr1} . "'></br>";
}
?>