PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Well i made a search field for my site, and now i'm trying to make it highlight the search terms once they were found.
This works, but it it replaces the search term ($post) completely, say i search for "WhAt" and in $line['content'] it has what, it would make it bold, like i want, but it will also replace it with "WhAt".
Sounds like you need to learn about regular expressions. I find this php.net page is VERY helpful, but a quick google for "Perl Regular Expressions" will come up with loads of suggestions.
Ambush Commander wrote:Sounds like you need to learn about regular expressions. I find this php.net page is VERY helpful, but a quick google for "Perl Regular Expressions" will come up with loads of suggestions.
Thanks, i know php.net is very usefull, just i didn't understand it the way they put it, but now i see theres a different side, Regular expressions.