久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

      <legend id='AMZOa'><style id='AMZOa'><dir id='AMZOa'><q id='AMZOa'></q></dir></style></legend>
      • <bdo id='AMZOa'></bdo><ul id='AMZOa'></ul>

      <tfoot id='AMZOa'></tfoot>

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

      2. PHP 將字符串拆分為整數元素和字符串

        PHP split string into integer element and string(PHP 將字符串拆分為整數元素和字符串)

        <small id='1btru'></small><noframes id='1btru'>

        <i id='1btru'><tr id='1btru'><dt id='1btru'><q id='1btru'><span id='1btru'><b id='1btru'><form id='1btru'><ins id='1btru'></ins><ul id='1btru'></ul><sub id='1btru'></sub></form><legend id='1btru'></legend><bdo id='1btru'><pre id='1btru'><center id='1btru'></center></pre></bdo></b><th id='1btru'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='1btru'><tfoot id='1btru'></tfoot><dl id='1btru'><fieldset id='1btru'></fieldset></dl></div>
      3. <tfoot id='1btru'></tfoot>

            <tbody id='1btru'></tbody>
            <legend id='1btru'><style id='1btru'><dir id='1btru'><q id='1btru'></q></dir></style></legend>
            • <bdo id='1btru'></bdo><ul id='1btru'></ul>
                • 本文介紹了PHP 將字符串拆分為整數元素和字符串的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個字符串說:Order_num = "0982asdlkj"

                  我怎樣才能把它分成 2 個變量,用數字元素,然后在 php 中用字母元素另一個變量?

                  How can I split that into the 2 variables, with the number element and then another variable with the letter element in php?

                  number 元素可以是 1 到 4 之間的任意長度,字母元素填充其余部分,使每個 order_num 總共有 10 個字符.

                  The number element can be any length from 1 to 4 say and the letter element fills the rest to make every order_num 10 characters long in total.

                  我找到了 php explode 函數......但不知道如何在我的情況下實現它,因為數字的數量在 1 到 4 之間,之后的字母是隨機的,所以無法在特定字母處拆分.請盡可能具體的幫助!

                  I have found the php explode function...but don't know how to make it in my case because the number of numbers is between 1 and 4 and the letters are random after that, so no way to split at a particular letter. Please help as specifically as possible!

                  推薦答案

                  您可以使用 preg_split 使用 前瞻和后視:

                  print_r(preg_split('#(?<=d)(?=[a-z])#i', "0982asdlkj"));
                  

                  印刷品

                  Array
                  (
                      [0] => 0982
                      [1] => asdlkj
                  )
                  

                  這僅在字母部分確實只包含字母而沒有數字時才有效.

                  This only works if the letter part really only contains letters and no digits.

                  更新:

                  只是為了澄清這里發生的事情:

                  Just to clarify what is going on here:

                  正則表達式查看每個位置,如果該位置之前有一個數字((?<=d))之后的一個字母((?=[az])),然后它匹配并且字符串在這個位置被拆分.整個事情不區分大小寫(i).

                  The regular expressions looks at every position and if a digit is before that position ((?<=d)) and a letter after it ((?=[a-z])), then it matches and the string gets split at this position. The whole thing is case-insensitive (i).

                  這篇關于PHP 將字符串拆分為整數元素和字符串的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                    <legend id='QJjRn'><style id='QJjRn'><dir id='QJjRn'><q id='QJjRn'></q></dir></style></legend>
                    <i id='QJjRn'><tr id='QJjRn'><dt id='QJjRn'><q id='QJjRn'><span id='QJjRn'><b id='QJjRn'><form id='QJjRn'><ins id='QJjRn'></ins><ul id='QJjRn'></ul><sub id='QJjRn'></sub></form><legend id='QJjRn'></legend><bdo id='QJjRn'><pre id='QJjRn'><center id='QJjRn'></center></pre></bdo></b><th id='QJjRn'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='QJjRn'><tfoot id='QJjRn'></tfoot><dl id='QJjRn'><fieldset id='QJjRn'></fieldset></dl></div>
                    <tfoot id='QJjRn'></tfoot>

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

                        • <bdo id='QJjRn'></bdo><ul id='QJjRn'></ul>
                            <tbody id='QJjRn'></tbody>
                            主站蜘蛛池模板: 国产成人99久久亚洲综合精品 | 精品国产乱码久久久久久丨区2区 | 亚洲国产精品久久久久秋霞不卡 | 国产免费xxx | 欧美激情一区二区 | 精品免费国产一区二区三区四区 | 三级成人在线 | 自拍偷拍小视频 | 毛片视频网站 | 天堂久久久久久久 | 国产免费观看视频 | 成人性生交大片 | 国产一区二区三区免费 | 天天爽一爽| av网站免费在线观看 | av性色全交蜜桃成熟时 | 国产日韩在线观看一区 | 亚洲性视频网站 | 国产视频二区 | www日| 人人人人干| 欧美日韩专区 | 9porny九色视频自拍 | 成人免费一区二区 | 国产视频久久 | 精品真实国产乱文在线 | 日韩在线免费视频 | 国产精品夜夜夜一区二区三区尤 | 国产视频1 | 国产一级毛片视频 | 国产在线精品一区二区三区 | 激情福利视频 | 亚洲久在线 | www.久久.com | 精品视频999 | 国产免费一区二区 | 91精品国产自产在线老师啪 | 精品久久久久久久久久 | 久久亚| 国产精品精品久久久 | 久久综合久色欧美综合狠狠 |