How to make PHP search for mysql and change the color of matching strings?
1234097
It will change like this Reply content: How to make PHP search for mysql and change the color of matching strings?
For example, search 123
Assuming that it matches 123: 09148
1234097It will change like this
Regular replacement, html tag + css$keyword = yourobj->yourmethod(); $pattern = "/$keyword/i"; $replacement = "$keyword"; echo preg_replace($pattern, $replacement, $keyword);