Title: Stop functions from echoing
Last modified: August 18, 2016

---

# Stop functions from echoing

 *  Resolved [hooligan](https://wordpress.org/support/users/hooligan/)
 * (@hooligan)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/stop-functions-from-echoing/)
 * How do I stop functions like the_author(); and comment_author(); from echoing
   to the screen. I need to compare the 2 in PHP.
 * <?php if(the_author() == comment_author()) { ?>

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

 *  Thread Starter [hooligan](https://wordpress.org/support/users/hooligan/)
 * (@hooligan)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/stop-functions-from-echoing/#post-535497)
 * Or can I get those values as strings without using those functions? I just need
   those two variables to determine if they contain the same string.
 * Thanks
 *  Thread Starter [hooligan](https://wordpress.org/support/users/hooligan/)
 * (@hooligan)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/stop-functions-from-echoing/#post-535498)
 * Don’t worry I worked out a way. Used
 * for($comments as $comment) : {
    if($comment->comment_author == ”

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

The topic ‘Stop functions from echoing’ is closed to new replies.

## Tags

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

 * 2 replies
 * 1 participant
 * Last reply from: [hooligan](https://wordpress.org/support/users/hooligan/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/stop-functions-from-echoing/#post-535498)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
