In the project, it is necessary to obtain the specified string in a certain text and then replace the obtained characters with the corresponding pictures, for example:
<p>名族特色[pig_12] [pig_12] [pig_12][smiley_1] [smiley_1] [smiley_4] [smiley_6]</p>
How to get [pig_number] and [[smiley_number], and then replace the intercepted characters with the specified picture? The image name is the same as the intercepted string name.
认证高级PHP讲师