php - How to add the html tag into codeigniter variable? -
i using following code display table row
$tablerow="<tr> <td style='text-align:center'>".$services[$i]['servicename']."</td> <td style='text-align:center'>".$services[$i]['servicedesc']."</td> <td style='text-align:right'>".$services[$i]['taxamt']."</td> </tr>";
but value display.i got following out
test tset 43500
i want these
<tr> <td style='text-align:center'>test</td> <td style='text-align:center'>tset</td> <td style='text-align:right'>43500</td> </tr>
you can use php function display value
$tablerow="<tr> <td style='text-align:center'>".$services[$i]['servicename']."</td> <td style='text-align:center'>".$services[$i]['servicedesc']."</td> <td style='text-align:right'>".$services[$i]['taxamt']."</td> </tr>";
echo htmlentities($tablerow)
;
Comments
Post a Comment