• Hi there,
    Im using wordpress and Sabai directory, I would like to create a A href using a php echo.

    Ive got <a href="<?php echo $entity->getAuthor()->url;?>"> which is working perfectly, except I need to append another url part to the end of the echo.

    Like :

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

    But that doesnt work, ive tried putting it in various places in the string, and using the concat function (which kind of worked but stripped hyphens from the output)

    What is the best way to do this? Im sure its really simple.

    Any help appreciated as im pulling my hair out lol..

    Kind Regards
    Andrew

Viewing 1 replies (of 1 total)
  • Thread Starter inebriated

    (@inebriated)

    Figured it out using:

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

    Thanks everyone,

    As a side not anyone using Sabai Directory can now use this code to allow linking to editing or claiming a listing.

Viewing 1 replies (of 1 total)
  • The topic ‘Add text to end of PHP echo, how to?’ is closed to new replies.