Reputation: 301
I am using tooltip inside of an echo statement i.e.
echo "<div id='image' data-toggle='tooltip' title=".$row['displayname'].">";
but it only displays the first word.
suppose the $row['displayname'] returns "here is the code" then on hover it only displays "here".
So any help Thankyou..
Upvotes: 2
Views: 175
Reputation: 3429
I am not sure this will work, but I think it would:
echo "<div id='image' data-toggle='tooltip' title='".$row['displayname']."'>";
Upvotes: 1
Reputation: 12293
If you don't add the quotes, it will take single word as title.
echo "<div id='image' data-toggle='tooltip' title='".$row['displayname']."'>";
or
echo "<div id='image' data-toggle='tooltip' title=\"".$row['displayname']."\">";
Upvotes: 2
Reputation: 1156
Try wrapping your title in '' quotes.
echo "<div id='image' data-toggle='tooltip' title='".$row['displayname']."'>";
Upvotes: 4