• Resolved splitvan

    (@splitvan)


    i want to write a function for author status:

    but i’m a php newbie:)
    can someone help me?

    It’s a very simple script that shows the authors status (like. newbie, junkie…)

    i made a variable the_author_posts() ;

    this is the code:

    <?php $var = the_author_posts()	;
    if ($var < 10) {
    	echo 'newbie';
    }elseif ($var < 20){
    	echo 'text20';
    }elseif ($var < 50){
    	echo text50';
    }elseif ($var < 100){
    	echo 'text100';
    }elseif ($var < 130){
    	echo 'text 130';
    
    } else {
            echo "textelse";
    }?>

    I putted the whole code in the loop. but for all the authors i get the status of newbie.

    I’m new to this, but can someone help me?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Write a function’ is closed to new replies.