将文本文件列表加载到
我正在开发一个 PHP 项目,该项目涉及选择一首歌曲,点击提交按钮,然后让 PHP 将歌曲播放器加载到正确的选项。
对于歌曲选择,我想从具有以下格式的 txt 文件中加载这些选项:
<br />
<code>All For Love <br /> Break Free <br />Come to the River <br />For You Nam </code>
我希望对其进行处理,最终得到这样的结果:
<br /> <code>
< option value="All For Love"> All For Love< /option> <br />
< option value="Break Free">Break Free< /option> <br />
< option value="Come to the River">Come To The River< /option> <br />
< option value="For Your Name">For Your Name< /option> <br />
我将如何实现这一目标? 到目前为止的项目
Im working on a PHP project that involves selecting a song, hitting the submit button and then having the PHP loading the song player to the correct option.
For the song selection I want to load these options from a txt file with the following formatting:
<br />
<code>All For Love <br /> Break Free <br />Come to the River <br />For You Nam </code>
Which I want to be processed to end up like this:
<br /> <code>
< option value="All For Love"> All For Love< /option> <br />
< option value="Break Free">Break Free< /option> <br />
< option value="Come to the River">Come To The River< /option> <br />
< option value="For Your Name">For Your Name< /option> <br />
How would I go about achieving this?
project so far
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)