rocky48 Posted May 31, 2012 Share Posted May 31, 2012 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\" > <tr> <th>ID</th> <th>VERSE</th> <th>MOOD/SUB TYPE</th> <th>Link</th> </tr>"; 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 .= " <tr> <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> </tr>"; } Can't see what is wrong! Am I missing something? Link to comment https://forums.phpfreaks.com/topic/263446-href-error-in-table/ Share on other sites More sharing options...
requinix Posted May 31, 2012 Share Posted May 31, 2012 You didn't escape the quotes in the link HTML. Link to comment https://forums.phpfreaks.com/topic/263446-href-error-in-table/#findComment-1350138 Share on other sites More sharing options...
rocky48 Posted June 4, 2012 Author Share Posted June 4, 2012 I put a quote after > (near top), but still get the same error? Am I being really thick! Link to comment https://forums.phpfreaks.com/topic/263446-href-error-in-table/#findComment-1351055 Share on other sites More sharing options...
HDFilmMaker2112 Posted June 4, 2012 Share Posted June 4, 2012 This: <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 .=' <tr> <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> </tr>'; Link to comment https://forums.phpfreaks.com/topic/263446-href-error-in-table/#findComment-1351062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.