Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi

    try this code, let me know if u have any questions?

    $users_of_blog = get_users_of_blog();

    //var_dump($users_of_blog);
    $contributor = array();
    $subscriber = array();
    $author = array();
    foreach ( (array) $users_of_blog as $b_user ) {

    $b_roles = unserialize($b_user->meta_value);
    foreach ( (array) $b_roles as $b_role => $val ) {

    if($b_role==’contributor’){
    array_push($contributor,$b_user->display_name);
    }
    if($b_role==’subscriber’){
    array_push($subscriber,$b_user->display_name);
    }
    if($b_role==’author’){
    array_push($author,$b_user->display_name);
    }

    }
    }

    <table width=”100″ border=”0″ cellspacing=”0″ cellpadding=”0″>
    <tr>
    <td align=”left”>Contributors</td>
    <td> </td>
    </tr>
    <?php
    $ccount = count($contributor);

    for ($i = 0; $i <= $ccount; $i++) {

    ?>
    <tr>
    <td align=”left”><?php echo $contributor[$i]?></td>
    <td> </td>
    </tr>
    <?php } ?>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </table>

Viewing 1 replies (of 1 total)