Requirement I need to split the following code into an array {code ...} PHP code: {code ...} the result is that the & amp; lt; & amp; gt; two symbols are lost. What can I do with the poly separator? Find the answer {code ...}
Requirement
I need to split the following code into arrays.
Caution: You will switch to sleep mode and cannot use the call, SMS, or network functions. Are you sure you want to change?
PHP code is
] +/"," \ "Caution: You will switch to sleep mode and cannot use the call, SMS, or network functions. Are you sure you want to change? \ ""); Echo"";print_r($keywords);echo "
";?>
The effect is as follows:
Lost <> two symbols. How can I use the poly separator?
I found the answer.
$ Keywords = preg_split ('/([<|>] +)/', '"Caution: You will switch to sleep mode and cannot use the call, SMS, or network functions. Are you sure you want to change? "',-1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
Reply content:
Requirement
I need to split the following code into arrays.
Caution: You will switch to sleep mode and cannot use the call, SMS, or network functions. Are you sure you want to change?
PHP code is
] +/"," \ "Caution: You will switch to sleep mode and cannot use the call, SMS, or network functions. Are you sure you want to change? \ ""); Echo"";print_r($keywords);echo "
";?>
The effect is as follows:
Lost <> two symbols. How can I use the poly separator?
I found the answer.
$ Keywords = preg_split ('/([<|>] +)/', '"Caution: You will switch to sleep mode and cannot use the call, SMS, or network functions. Are you sure you want to change? "',-1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
$ Keywords = preg_split ('/([<|>] +)/', '"Caution: You will switch to sleep mode and cannot use the call, SMS, or network functions. Are you sure you want to change? "',-1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );