html - Return <td> formatted as <a> link [ajax] -


i want return mysql query result field html clickable formatted link.

//i want format clmlink clickable link while($row = mysql_fetch_array($qry_result)){     $display_string .= "<tr>";     $display_string .= "<td class='td1'>$row[clmdate]</td>";             $display_string .= "<td class='td2'>$row[clmnames]</td>";     $display_string .= "<td class='td3'>$row[clmcomment]</td>";     $display_string .= "<td class='td4'>$row[clmlink]</td>";                    $display_string .= "</tr>";  
<head>                       <style>           .td4 {              padding-right: 20px;              padding-top: 10px;              background-color: #e6e6fa;              width: 100px;                   }                </style>          </head>  

you can add <a> tag :

$display_string .= '<td class="td4"><a href="'.$row[clmlink].'">'.$row[clmlink].'</a></td>' 

if don't want use <td>, have use javascript make <td> clickable , add css :

.td4{     cursor : pointer;     color : blue; } .td4:hover{     color : light-grey; } 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -