PHP Echo - How do I add text to end of of line? -



PHP Echo - How do I add text to end of of line? -

im using wordpress , create a href using php echo.

im trying acheive following, have url generated automatically text appended on end: www.mysite.com/mytext

i have php echo retrieves current page url, need add together on /mytext end of url perform function on page when clicked.

ive got <a href="<?php echo $entity->getauthor()->url;?>"> working perfectly, except need append url part end of echo.

like :

<a href="<?php echo $entity->getauthor()->url;?>/mytext">

but doesnt work, ive tried putting in various places in string, , using concat function (which kind of worked stripped hyphens output)

what best way this? im sure simple.

any help appreciated im pulling hair out lol..

kind regards andrew

using

<a href="<?php echo $entity->getslug() . '/mytext';?>">

did trick me. suspect work plugin, though (sabai directory).

php text echo

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -