Hello Guest! Welcome to my website.

You can benefit from our privileges as a member of our site.

or Register

Share4all How to fetch Data in WordPress using get_results

alex

New member
Joined
Oct 26, 2021
Messages
17
Reaction score
0
Points
1
PHP:
<?php
global $wpdb;
$result = $wpdb->get_results ( "SELECT * FROM wp_my_user" );
foreach ( $result as $print ) {
?>
<tr>
<td><?php echo $print->name;?></td>
<td><?php echo $print->email;?></td>
<td><?php echo $print->address;?></td>
</tr>
<?php
}
?>
 
Top