Home  >  Article  >  Backend Development  >  满100减50 如何把100和50抽出来呢~ 满的数字和减的数字不一样

满100减50 如何把100和50抽出来呢~ 满的数字和减的数字不一样

WBOY
WBOYOriginal
2016-06-13 11:09:441165browse

满100减50 怎么把100和50抽出来呢~~ 满的数字和减的数字不一样
满100减50  怎么把100和50抽出来呢~~ 


满的数字和减的数字不一样哦~~~求一个通用例子
------解决方案--------------------

$s = '满100减50';<br /><br />preg_match_all('/(\D+)(\d+)/', $s, $r);<br />$t = array_combine($r[1], $r[2]);<br /><br />print_r($t);
Array
(
    [满] => 100
    [减] => 50
)

带上文字,便于识别

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn