Echo this string properly so i have something to study from

I have table and i know how to do most of the echo strings, BUT when i get a long one that include words, and headings i get lost. So how do i convert this line?

<a class="signUpButton" href="#">Sign Up</a>

Take this line and get it to work in the below code which is only partial code.

echo "<tr>";
echo "<td>" . $row->name . "</td>";
echo "<td>" . $row->monthly . "</td>";
echo "<td>" . $row->annually . "</td>";
echo "</tr>";
echo "</tr>";
}
echo "</tbody>"; 
echo "<tfoot>";
echo "<tr>";
echo "<td>";
echo "<a class='signUpButton','href='#'>";
echo "</a>";
echo "</td>";
echo "<td>";
echo "<a class='signUpButton','href='#'>";
echo "</a>";
echo "</td>";
echo "<td>";
echo "<a class='signUpButton','href='#'>";
echo "</a>";
echo "</td>";                
echo "</tr>";
echo "<tfoot>";

This code here is what i have now.

echo "<a class='signUpButton','href='#'>";

it does not work either so something is up. only part that works is everything from the echo to the ',' it closes fine, im just not able to see my mouse pointer show that indeed it is a link..

P.S. this code above is only a section, the table is huge, and is working except for the minor issues i am having with links and displaying the button words "signup"

Answers


I'm not quite sure what you're asking, but if you need to echo out:

<a class="signUpButton" href="#">Sign Up</a>

then use:

echo '<a class="signUpButton" href="#">Sign Up</a>';

or:

echo "<a class=\"signUpButton\" href=\"#\">Sign Up</a>";

The first method uses single quotes in the echo statement allowing the use of double quotes inside The second method uses double quotes for the echo statement so uses a \ character to escape the " inside the echo so it doesn't close it.


Need Your Help

Python access an object byref / Need tagging

python object tags byref

I need to suck data from stdin and create a object.

Scroll to element in Iscroll

jquery jquery-mobile uiscrollview iscroll4 iscrollview

I Trying to use the scroll to element function in the jquery mobile Iscroll