I would like to combine the usage of a function(), and echo it with a string operator.
The reason for this usage is that I'm building a html/php form what contains multiple pull down menus, where only the name is different. And I use the string operator for my SQL query with while/if/else statements.
Function:
function telling($setname)
{
echo "<select name=".$setname.">";
foreach (range(0, 35) as $number)
{
echo "<option value=".$number.">".$number."</option>
";
}
echo "</select>";
}
And for the output:
$output "";
$output .= "<form>";
telling("set1_1");
$output .= " - ";
telling("set1_2");
....
$output .= "</form>";
echo $output;
I do get the pulldown menu on the site, but on a different part on the site as intended. Do you guys know how to combine my methods.