Title: Echo quotes inside function?
Last modified: August 21, 2016

---

# Echo quotes inside function?

 *  [reneequinn](https://wordpress.org/support/users/reneequinn/)
 * (@reneequinn)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/echo-quotes-inside-function/)
 * Can’t seem to work this one out – hoping someone can quell my frustration:
 * I’m using Advanced Custom Fields (which I love!) and need to echo “get_the_field(‘
   field_name’)”. Should all be easy, so I thought. But I can’t use the (‘field_name’)
   within the statement as single quotes are used for other purposes. I’ve tried
   double quotes, combinations, etc. but can’t get it working. Any help appreciated
   🙂 My echo statement is
 *     ```
       echo '<h5><a href="'.get_permalink().'">'.get_the_field() . '</a></h5>';
       ```
   

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/echo-quotes-inside-function/#post-3818430)
 * you can break your code into several lines at any time.
 * however, using any quotes within your function `get_the_field()` should be no
   problem;
    what was the exact code that ‘failed’? and what was the result?
 *  Thread Starter [reneequinn](https://wordpress.org/support/users/reneequinn/)
 * (@reneequinn)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/echo-quotes-inside-function/#post-3818470)
 * Hi Alchymyth,
 * Seems that it must have been something with my code cause it’s all working now?
   I’m not sure what I did to get it working but this works fine:
 *     ```
       echo '<h5><a href="'.get_permalink().'">'.get_the_field('the_field') . '</a></h5>';
       ```
   
 * Thanks for your offer of help 🙂

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

The topic ‘Echo quotes inside function?’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [reneequinn](https://wordpress.org/support/users/reneequinn/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/echo-quotes-inside-function/#post-3818470)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
