Jump to content

href error in table

Go to solution Solved by HDFilmMaker2112,

Recommended Posts

I have rewritten a script to include a link in a table, but it comes up with a parse error:

unexpected T_STRING

//create the display string
$display_block = "
<p> The Event Type is <b> 
 '".$Event_Name."'</b> </p>
<table width=\"70%\" cellpadding=\"3\" cellspacing=\"1\" border=\"1\" BGCOLOR=\"#87CEEB\" >
<th>MOOD/SUB TYPE</th>

while ($Verse_info = mysqli_fetch_array($get_Event_res)) {
	$Verse_id = $Verse_info['versesID'];
	$Verse_text = nl2br(stripslashes($Verse_info['Verse']));
	$Mood_info = $Verse_info['Event_Sub_Type'];

	//add to display
 	$display_block .= "
	<td width=\"1%\" valign=\"top\">".$Verse_id."<br/></td>
	<td width=\"55%\" valign=\"top\">".$Verse_text."<br/></td>
	<td width=\"35%\" valign=\"top\">" .$Mood_info."<br/></td>
	<td width=\"9%\" valign=\"top\"> <a href="Size_Menu.html">Click here to choose</a> </td>


Can't see what is wrong!

Am I missing something?

Link to comment
Share on other sites

  • Solution



<a href="Size_Menu.html">Click here to choose</a> </td>


Should be this:


<a href=\"Size_Menu.html\">Click here to choose</a> </td>



Or use single quotes around everything:


 	$display_block .='
	<td width="1%" valign="top">'.$Verse_id.'<br/></td>
	<td width="55%" valign="top">'.$Verse_text.'<br/></td>
	<td width="35%" valign="top">'.$Mood_info.'<br/></td>
	<td width="9%" valign="top"><a href="Size_Menu.html">Click here to choose</a></td>

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.