1. <tfoot id='m7Nco'></tfoot>
      • <bdo id='m7Nco'></bdo><ul id='m7Nco'></ul>

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

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

      2. 如何在 PHP 中通过多个分隔符分割字符串?

        时间:2023-10-03
          <bdo id='KMAEy'></bdo><ul id='KMAEy'></ul>
          • <i id='KMAEy'><tr id='KMAEy'><dt id='KMAEy'><q id='KMAEy'><span id='KMAEy'><b id='KMAEy'><form id='KMAEy'><ins id='KMAEy'></ins><ul id='KMAEy'></ul><sub id='KMAEy'></sub></form><legend id='KMAEy'></legend><bdo id='KMAEy'><pre id='KMAEy'><center id='KMAEy'></center></pre></bdo></b><th id='KMAEy'></th></span></q></dt></tr></i><div id='KMAEy'><tfoot id='KMAEy'></tfoot><dl id='KMAEy'><fieldset id='KMAEy'></fieldset></dl></div>
              <tbody id='KMAEy'></tbody>
              1. <small id='KMAEy'></small><noframes id='KMAEy'>

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

                  <tfoot id='KMAEy'></tfoot>
                  本文介绍了如何在 PHP 中通过多个分隔符分割字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  这里有东西;还有,哦,仅此而已!"

                  我想用;,

                  所以处理后应该得到:

                  something here
                  
                  and there
                  
                  oh
                  
                  that's all!
                  

                  推荐答案

                  <?php
                  
                  $pattern = '/[;,]/';
                  
                  $string = "something here ; and there, oh,that's all!";
                  
                  echo '<pre>', print_r( preg_split( $pattern, $string ), 1 ), '</pre>';
                  

                  更新了一个更新问题的答案:

                  Updated answer to an updated question:

                  <?php
                  
                  $pattern = '/[x{ff0c},]/u';
                  
                  //$string = "something here ; and there, oh,that's all!";
                  $string = 'hei,nihao,a ';
                  
                  
                  echo '<pre>', print_r( preg_split( $pattern, $string ), 1 ), '</pre>';
                  

                  这篇关于如何在 PHP 中通过多个分隔符分割字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:PHP - 在键/值对中拆分字符串 下一篇:PHP 将字符串拆分为整数元素和字符串

                  相关文章

                  最新文章

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

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

                      <tfoot id='XSIpk'></tfoot>