WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Put TWO lines of PHP into ONE – quotes a problem ?

[Resolved] Put TWO lines of PHP into ONE – quotes a problem ?

  • Would like to put the following on one line !

    <?php
    $lnk = get_user_meta( 85, 'thenetwork', true ) . get_user_meta( 85, 'nickname', true ).'/';
    echo "<a href = '$lnk'>Go To</a>";
    ?>

    The above produces a link – as expected

    But when I try

    <?php
    echo "<a href = 'get_user_meta( 85, 'thenetwork', true ) . get_user_meta( 85, 'nickname', true ).'/';'>Go To</a>";?>

    the link it produces is not correct or properly formed —->my domain.com /the name of the page/get_user_meta( 85,

    Help to get this on one line much appreciated.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Put TWO lines of PHP into ONE – quotes a problem ?’ is closed to new replies.
Skip to toolbar