Title: Stupid php question
Last modified: August 19, 2016

---

# Stupid php question

 *  [mpjltd](https://wordpress.org/support/users/mpjltd/)
 * (@mpjltd)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/)
 *     ```
       // add custom post content
       function add_post_content($content) {
       	if(!is_feed() && !is_home()) {
       		$content .= '<p>Copyright &copy; '.date('Y').'&nbsp;'.bloginfo('name').'</p>';
       	}
       	return $content;
       }
       add_filter('the_content', 'add_post_content');
       ```
   
 * The html source output is
    `myblog<p>Copyright &copy; 2011&nbsp;</p>`
 * and normal:
 *     ```
       myblog
       Copyright © 2011
       ```
   
 * WHat is wrong with my php ?

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

 *  [_blackened_](https://wordpress.org/support/users/_blackened_/)
 * (@_blackened_)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965414)
 * Nothing. What’s your charset?
 * And why do you write out the &copy and &nbsp. That’s not necessary if you use
   the right charset.
 *  Thread Starter [mpjltd](https://wordpress.org/support/users/mpjltd/)
 * (@mpjltd)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965417)
 * utf-8
 *  [converting2wp](https://wordpress.org/support/users/converting2wp/)
 * (@converting2wp)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965554)
 * Or are you asking why the “myblog” is coming out before the copyright notice 
   instead of after as in the
 *     ```
       $content .= '<p>Copyright &copy; '.date('Y').'&nbsp;'.bloginfo('name').'</p>';
       ```
   
 * in your original post?
 * Hope you’ve figured this out …
 *  Thread Starter [mpjltd](https://wordpress.org/support/users/mpjltd/)
 * (@mpjltd)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965558)
 * nope
 *  [converting2wp](https://wordpress.org/support/users/converting2wp/)
 * (@converting2wp)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965559)
 * So the question is that “bloginfo” is at the end of the PHP code but at the beginning
   of the output?
 * Bizarre.
 *  Thread Starter [mpjltd](https://wordpress.org/support/users/mpjltd/)
 * (@mpjltd)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965561)
 * yes, correct
    I really don’t have a clue
 *  [GRAQ](https://wordpress.org/support/users/graq/)
 * (@graq)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965564)
 * Use [http://codex.wordpress.org/Function_Reference/get_bloginfo](http://codex.wordpress.org/Function_Reference/get_bloginfo)
   instead
 *  [converting2wp](https://wordpress.org/support/users/converting2wp/)
 * (@converting2wp)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965567)
 * Doh. Thanks, GRAQ.
 *  Thread Starter [mpjltd](https://wordpress.org/support/users/mpjltd/)
 * (@mpjltd)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965580)
 * it’s like when u go to a shop ask where the toilet paper is, and the answer is:
   it’s there where the toilet paper is.

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

The topic ‘Stupid php question’ is closed to new replies.

## Tags

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

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 9 replies
 * 4 participants
 * Last reply from: [mpjltd](https://wordpress.org/support/users/mpjltd/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/stupid-php-question/#post-1965580)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
