I have a WordPress page that connects to an external database from WordPress using the following code:
$my_wpdb = new wpdb('me', 'password', 'database', 'localhost');
$myrows = $my_wpdb->get_results( "SELECT Name FROM testing" );
...then i use print_r($myrows); and get the following:
Array
(
[0] => stdClass Object (
[Name] => Jesus
)
[1] => stdClass Object (
[Name] => James
)
[2] => stdClass Object (
[Name] => Matt
)
)
Now I need to output the names inside those objects in a select tag using php.
Any help would be appreciated.
Namein each row should be an<option>in a<select>html tag?