开发者

Calling text from between specific HTML tags to use as data for a variable in PHP

开发者 https://www.devze.com 2023-02-16 17:46 出处:网络
Trying to add more functionality to my gaming site that\'s running Invision Power Board software. It co开发者_开发问答mes with the ability to add custom BBcode, and I\'m trying to make a tag that can

Trying to add more functionality to my gaming site that's running Invision Power Board software. It co开发者_开发问答mes with the ability to add custom BBcode, and I'm trying to make a tag that can use the poster's item name and use PHP to pick out the correct item file and display it as html in place of the tag.

My question is, how do I take [tag=option] and plug the option into a PHP switch's variable to allow a poster to define the case? The software would turn [tag=option] into <p><div id="item">{option}<br /><br /><?php switch goes here ?></div></p>.

I've run around google searching through W3C and this site and other random places and I haven't been able to find a solution to my problem. Maybe I just don't know what I should be looking for. Please help?


there is a way to do this..... i did something similar on an ajax chatbox, changing

:lmao:

into

<img src="/smileys/lmao.png">

depending on your existing form script to display code.....

mine only needed a simple str_replace, but all site configs are different

can you edit your question, and paste your php code that displays the page you want the divs to appear on.....

thanks.

edit.... maybe i should have read date posted before answering pmsl

0

精彩评论

暂无评论...
验证码 换一张
取 消