I have a pretty complex but well-formatted HTML string with lots of links in it. Part of my task is to convert all anchors into bold having the word “XX1”. Is this possible to do in PHP without using jQuery/js?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
preg_replacefor this, try:Didn’t test the pattern, should work though.