Title: Inserting PHP code into a echo statement
Last modified: August 19, 2016

---

# Inserting PHP code into a echo statement

 *  [foot01](https://wordpress.org/support/users/foot01/)
 * (@foot01)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/inserting-php-code-into-a-echo-statement/)
 * I apologize if this is the wrong section to post this in but I have an issue –
   all I want to do is have this statement work by inserting the “<?php bloginfo(‘
   template_url’); ?>'” into this example. This doesn’t work for me.
 * echo <img src=”‘.<?php bloginfo(‘template_url’); ?>.'”/images/subdirectory/whatevergraphic.
   gif” border=”0″>
 * I’m getting a syntax error. I’ve looked up simple combining php code etc and 
   nothing is working for me.
 * Am I not doing the php right? Any help would be great please!

Viewing 1 replies (of 1 total)

 *  Thread Starter [foot01](https://wordpress.org/support/users/foot01/)
 * (@foot01)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/inserting-php-code-into-a-echo-statement/#post-1120270)
 * Sorry the examples is this:
 * echo ‘<img src=”‘.<?php bloginfo(‘template_url’); ?>.'”/images/subdirectory/whatevergraphic.
   gif” border=”0″>’;
 * single quotes surrounding the echo statement.

Viewing 1 replies (of 1 total)

The topic ‘Inserting PHP code into a echo statement’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [foot01](https://wordpress.org/support/users/foot01/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/inserting-php-code-into-a-echo-statement/#post-1120270)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
