I am making a widget that shows images in places where the user puts a {0} or {5}. can this be done with php? i dont know where to start and i have worn out my fingertips searching for it on google because i dont know good keywords.
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.
Yes, it can be done. For simple cases use
str_replacedocs and for more complex cases usepreg_replacedocs.The supplied PHP manual links will tell you all about it. You’ll probably want to try
str_replacefirst as it’s much simpler than using regular expressions.