Here’s my problem that I’ve been stumped on for the last few hours
I’m creating a class to create html forms with: https://gist.github.com/1966505
In the create_fields() method I loop through a multidimensional array to create the form fields
This is what I end up with:
$input = '<tr>';
$input .= "<th><label for=\\"$id\\">$desc</label></th>";
$input .= '<td><'.$form.' ></td>';
$input .= '</tr>';
var_dump($input);
string '<tr><th><label for="feed-name">The name of the feed:</label></th><td><input type="text" name="affiliate_hoover_plugin_options[feedName]" id="feed-name" class="regular-text code " maxlength="200" value="" ></td></tr>' (length=220)
string '<tr><th><label for="url-name">The URL of the feed:</label></th><td><input type="text" name="affiliate_hoover_plugin_options[urlName]" id="url-name" class="regular-text code " maxlength="300" value="" ></td></tr>' (length=216)
Great
So if I was to echo it, no problems
However, when I try to take the returned values and use them in another method they disappear.
It’s not a scope issue it is how I am collecting the data from the loop that is the root of the problem
I’m sure there must be an easy solution that has passed me by