Title: Help with PHP
Last modified: August 18, 2016

---

# Help with PHP

 *  Resolved [junipingla](https://wordpress.org/support/users/junipingla/)
 * (@junipingla)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-php/)
 * In my comment template I have this code:
 *     ```
       <?php foreach ($comments as $comment) : ?>
       <?php
       $isByAuthor = false;
       if($comment->comment_author_email == 'xxxx@xxxxxx.xxx') {
       $isByAuthor = true;
       }
       ?>
   
       <li class="<?php echo $oddcomment; ?> <?php if($isByAuthor ) { echo 'authorcomment';} ?>" id="comment-<?php comment_ID() ?>">
   
       <cite><?php comment_author_link() ?></cite> skriver:
       			<?php if ($comment->comment_approved == '0') : ?>
       			<em>Your comment is awaiting moderation.</em>
       			<?php endif; ?>
       ```
   
 * It make my own comments stand out. Now I would like to change this part “skriver:”
   
   When it’s my own admin comments I would like it to display “svarar:” instead.
   Any kind soul who can help me with the code?
 * Thanks! :))

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-php/#post-597447)
 * change this:
 * `</cite> skriver:`
 *  Thread Starter [junipingla](https://wordpress.org/support/users/junipingla/)
 * (@junipingla)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-php/#post-597449)
 * Whoooami: But I need a php snippet to use, it should be skriver: for all regular
   comments but svarar: when it’s one of my own.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-php/#post-597450)
 * i dont understand what you are asking.
 * XXxxxxXX
 * Nevermind, I get it .. skriver is comment in whatever language or something..
 *  Thread Starter [junipingla](https://wordpress.org/support/users/junipingla/)
 * (@junipingla)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-php/#post-597452)
 * I solved it my self, thanks for your time. I added:
    `<?php if($isByAuthor ) {
   echo 'svarar:'; }else echo 'skriver:'; ?>`
 *  Thread Starter [junipingla](https://wordpress.org/support/users/junipingla/)
 * (@junipingla)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-php/#post-597453)
 * Yes “skriver” means “says” in swedish 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Help with PHP’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 5 replies
 * 2 participants
 * Last reply from: [junipingla](https://wordpress.org/support/users/junipingla/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-php/#post-597453)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
