It becomes convenient for user, when he searches something and in the result he can see his keyword highlighted.
Syntax
1
2
3
4
5
|
<?php
$string = "I like chocolates and I like apples";
$words = "apple";
echo highlighter_text($string ,$words);
?>
|
0 comments:
Post a Comment