Hello,
I am using the below code snippet to print the latest users with pictures. Can some kind soul tell me how to modify the code snippet to print last 20 users with pictures? I want to print 4 pictures in a row. Hence the table would require 5 rows. I tried lot of permutations and combinations to no avail.
Any help is appreciated.
<?php //show user pictures --------------------------- //Will only show those users who have a picture $count = 4; //how many userpictures, edit this value
global $user;
$output = '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%"><TR><TD ><center>';
$result = db_query_range("SELECT * FROM {users} as u where status=1 AND picture <> '' ORDER BY created DESC",0,$count);
while ($user_info = db_fetch_object($result)) { $output .= '<a href="/user/'.$user_info->uid.'"> <img src="/'.$user_info->picture.'" hspace=0 height="90" ></a>'; }
$output .= '</center></TD></TR></TABLE>'; //------------------------------------------------------ print $output; ?> You must be a registered user to view other users' profiles.