I am using a piece of code to show the city output. It is working fine. The code is given here:

$city = get_comment_meta( get_comment_ID(), 'city', true );

I want to show Re: text before the output of above code.

closed as off-topic by Mark Kaplun, TheDeadMedic, Pieter Goosen, Mayeenul Islam, bueltge Jul 4 '16 at 10:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you just want to add a string it would be $city = "Re: " . get_etcetera.. Else I don't know what you are trying to achieve. – cjbj Jun 28 '16 at 18:20
  • 1
    Great that helped. I've included it as an answer. Pleas accept it, so this question does not pop up later as "unsolved": – cjbj Jun 30 '16 at 7:25
  • @cjbj this will in all probability be closed, need one close vote to close this as off topic as it is generic PHP. Also note, a question is considered answered when it has an upvoted answer. It is always much better to have an accepted answer, but a question do not need an accepted answer to be considered answered by the system – Pieter Goosen Jul 1 '16 at 7:01
  • 1
    @PieterGoosen I know. But I also know we have a large close-vote-backlog, so I follow both paths. – cjbj Jul 1 '16 at 7:09

If you just want to add a string it would be:

$city = "Re: " . get_comment_meta( get_comment_ID(), 'city', true ); 

Not the answer you're looking for? Browse other questions tagged or ask your own question.