php 字符串 -- 数组
1. 数组-->字符串$payment= array(2) { => string(2) "10" => string(2) "20" }
$res['payment'] = implode('+',$payment);
//$res['payment']= string(5) "10+20"
2. 字符串 ->数组
paymentAllStr[]=str_split($res['payment'])
array(5) { => string(1) "1" => string(1) "0" => string(1) "+" => string(1) "2" => string(1) "0" } /
$payment = explode('+',$res['payment'])
array(2) { => string(2) "10" => string(2) "20" }
页:
[1]