Assistance needed with code syntax

Posted on 2009-02-20
Last Modified: 2012-05-06
Hi all,

I am having a problem with this code [attached below]:

No errors but the text on the button coming out is:

class="button (which is part of the code) ... instead of "view" which it get's from the table.

Hope you can help



echo '<a href="'.$row["button_link"].'" class="button viewbtn"><span>'.$row["button_text"].'</span></a>';

Open in new window

Question by:ST3VO
    LVL 48

    Accepted Solution

    try this:

    echo "<a href='".$row["button_link"]."' class='button viewbtn'><span>".$row["button_text"]."</span></a>";
    LVL 8

    Expert Comment

    you code working fine ... if you can post the complete code

    Author Closing Comment

    Works great! Thanks a lot!!! :o)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    As this topic comes over and over again in different forms, I've finally decided to write a short (yea, right...) article / tutorial about pagination with PHP with MySQL database. There are dozens of these kind of tutorials, I know - I wanted to mak…
    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    The viewer will learn how to dynamically set the form action using jQuery.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now