Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Execute command from array
- Dave Thomas
August 11, 2005, 7:44 pm
rate this thread
$commands = array(
"Start Date" => "build_date('startdate')",
"End Date" => "build_date('enddate')"
Only it will have many more entries. I want to cycle through the array,
and print the first part, but then execute the second part so that it
goes to the function build_date (which returns html code to output).
Right now I am doing it something like this:
echo "<tr><td>Start date</td><td>";
echo "</td><td>End date</td><td>";
Because this is going to have many entries in it, it is getting very
repetitive to do it this way! I am stuck on how to execute that function
(and pass the string) with it already being a string itself.