1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

debugging this code, should be simple

Discussion in 'PHP' started by JakeThePeg, Dec 14, 2008.

  1. #1
    Hey - could some please help me debug this piece of code...

    Here's the error but I can't work out exactly where it is.... Parse error: syntax error, unexpected '>'

    <?php
    
    $authors = $wpdb->get_results("SELECT ID, display_name from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name");
    
    $author_count = array();
    
    echo "<ul>";
    foreach ( (array) $authors as $author ) {
    		$author = get_userdata( $author->ID );
    		$posts = (isset($author_count[$author->ID])) ? $author_count[$author->ID] : 0;
    		$name = $author->display_name;
    
    echo "<a href='/author/" . $author->user_login . "/" . "'>;
    
    echo "<li>" . userphoto_thumbnail($author->ID, ' ', ' ', array(style => 'border:0')) . " " . $user->display_name . "</li>"; 
    
    echo $author->display_name;
    echo "</a>";
    }
    echo "</ul>";
    ?>
    
    
    PHP:
     
    JakeThePeg, Dec 14, 2008 IP
  2. MrSteveC

    MrSteveC Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    echo "<a href='/author/" . $author->user_login . "/" . "'>;
    PHP:

    You're missing a double quote off the end.
     
    MrSteveC, Dec 14, 2008 IP
  3. JakeThePeg

    JakeThePeg Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Oh yeah! :) Thanks!
     
    JakeThePeg, Dec 14, 2008 IP