<legend id='JRVag'><style id='JRVag'><dir id='JRVag'><q id='JRVag'></q></dir></style></legend>

    1. <small id='JRVag'></small><noframes id='JRVag'>

    2. <i id='JRVag'><tr id='JRVag'><dt id='JRVag'><q id='JRVag'><span id='JRVag'><b id='JRVag'><form id='JRVag'><ins id='JRVag'></ins><ul id='JRVag'></ul><sub id='JRVag'></sub></form><legend id='JRVag'></legend><bdo id='JRVag'><pre id='JRVag'><center id='JRVag'></center></pre></bdo></b><th id='JRVag'></th></span></q></dt></tr></i><div id='JRVag'><tfoot id='JRVag'></tfoot><dl id='JRVag'><fieldset id='JRVag'></fieldset></dl></div>

        <tfoot id='JRVag'></tfoot>
          <bdo id='JRVag'></bdo><ul id='JRVag'></ul>
      1. PHP $_REQUEST 作为数组

        PHP $_REQUEST as array(PHP $_REQUEST 作为数组)
          <tbody id='VKnu0'></tbody>

                • <bdo id='VKnu0'></bdo><ul id='VKnu0'></ul>
                  <i id='VKnu0'><tr id='VKnu0'><dt id='VKnu0'><q id='VKnu0'><span id='VKnu0'><b id='VKnu0'><form id='VKnu0'><ins id='VKnu0'></ins><ul id='VKnu0'></ul><sub id='VKnu0'></sub></form><legend id='VKnu0'></legend><bdo id='VKnu0'><pre id='VKnu0'><center id='VKnu0'></center></pre></bdo></b><th id='VKnu0'></th></span></q></dt></tr></i><div id='VKnu0'><tfoot id='VKnu0'></tfoot><dl id='VKnu0'><fieldset id='VKnu0'></fieldset></dl></div>

                  <small id='VKnu0'></small><noframes id='VKnu0'>

                • <tfoot id='VKnu0'></tfoot>
                • <legend id='VKnu0'><style id='VKnu0'><dir id='VKnu0'><q id='VKnu0'></q></dir></style></legend>
                  本文介绍了PHP $_REQUEST 作为数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个搜索表单,我想将搜索词作为数组 $_REQUEST 以便我可以列出每个搜索词,将每个词包装在一个跨度中以进行样式设置.我该怎么做?

                  I have a search form, I want to $_REQUEST the search terms as an array so I can list each search term out, wrapping each term in a span for styling. How do I do that?

                  这是请求的代码.

                  <form action="http://localhost/wordpress" id="search" method="get">
                  <input type="text" size="30" id="s" name="s" value="Type and hit enter" onfocus="javascript:this.value='';" onblur="javascript:this.value='Type and hit enter';"/>
                  <br/>
                  <input type="submit" value="Search"/>
                  </form>
                  

                  更新:感谢大家的回复.我将使用爆炸,它看起来相当简单.加上名字听起来很酷^^

                  Update: Thanks guys for the responses. I'll use explode, it seems fairly straightforward. Plus the name sounds cool ^^

                  推荐答案

                  形式:

                  <input type="text" name="terms[]" />
                  <input type="text" name="terms[]" />
                  <input type="text" name="terms[]" />
                  

                  在表单处理器中:

                  <? foreach($_REQUEST['terms'] as $term) { ?>
                      <span style="searchterm"><?= htmlspecialchars($term) ?></span>
                  <? } ?>
                  

                  这篇关于PHP $_REQUEST 作为数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                    <tbody id='qZPnf'></tbody>
                  1. <i id='qZPnf'><tr id='qZPnf'><dt id='qZPnf'><q id='qZPnf'><span id='qZPnf'><b id='qZPnf'><form id='qZPnf'><ins id='qZPnf'></ins><ul id='qZPnf'></ul><sub id='qZPnf'></sub></form><legend id='qZPnf'></legend><bdo id='qZPnf'><pre id='qZPnf'><center id='qZPnf'></center></pre></bdo></b><th id='qZPnf'></th></span></q></dt></tr></i><div id='qZPnf'><tfoot id='qZPnf'></tfoot><dl id='qZPnf'><fieldset id='qZPnf'></fieldset></dl></div>
                  2. <tfoot id='qZPnf'></tfoot>
                    <legend id='qZPnf'><style id='qZPnf'><dir id='qZPnf'><q id='qZPnf'></q></dir></style></legend>
                      <bdo id='qZPnf'></bdo><ul id='qZPnf'></ul>

                    • <small id='qZPnf'></small><noframes id='qZPnf'>