Hey guys I have been working on a PHP table and would like to add some tooltips to my table data. I'm using the hint.css library.
$housingvar .= "<table>". "<tbdoy>". "<tr>". "<td>". $result['username']. "</td>". "</tr>". "</tbody>". "</table>";
Thats my piece of code. I need to add a tooltip to $result['username'] part. Any idea how I would do that? I cannot use echo on my software.
<span class="hint--bottom" aria-label="Thank you!">hover over me.</span>
Thats how you make tooltips in HINT.CSS
Cheers and regards.
Since you "can't use an echo" you should look at using an output buffer which allows you to capture what would be echos to a variable and use it later
<?php ob_start();
echo "something, but it does not print now";
echo "echo something else";
$output = ob_get_contents();
ob_end_clean();
// now you have a variable set to what would have been output to the screen
// and can use it in your template later
?>