Results 1 to 3 of 3

Thread: [RESOLVED] Display a link, etc using php

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Display a link, etc using php

    Hi,

    What is the best way to display a link, etc using php? I know that I can use:

    PHP Code:
    echo "<a href=../index.php>Home</a>"
    However, it doesn't make much sense to use php if all I'm doing is echoing the html code.

    Thanks,


    Nightwalker
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Display a link, etc using php

    close your php code, use HTML, open php again.

    PHP Code:
    <?php
    if ($jose == "taco") { ?>
         <a href="hello.php">Hello</a>
    <?php } else { ?>
         <a href="goodbye.php">Goodbye</a>
    <?php }

    //code... code...

    }

  3. #3

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Display a link, etc using php

    Ah ok! Thanks.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width