Hi guys,
I use sunctions to display some rather large forms as part of a program, a bit like this
if($SomeCondition) {
PrintFormOne();
} else { PrintFormTwo();
Now the forms contain vars as values so currently i write the functions a bit like this;
function PrintFormOne() {
global $val1, $val2, $etc;
$form="<form action=\"$PHP_SELF\" method=POST>\n";
$form.="<input type=text value=$val1>\n";
$form.="etc etc etc<br>\n";
$form.="</form>\n";
return $form;
}
Surely theres a better way than all that $form.='s rubbish?
Much thanks folks
Nick