I have following foreach loop code...
<?php
$usernames = $wpdb->get_results( "SELECT user_name FROM wpxa_project_members WHERE project_id = 698" );
foreach ( $usernames as $username )
{
echo $username->user_name;
}
?>
When I use echo $username->user_name;
it displays all the usernames from the user_name
column of database. I want to display only the first username from the list. How to do... Pl help... Thanks...
foreach
will obviously print all usernames