我有一段..我想用一些随机值替换空格。例如
" $string="Kapa dim nen ma sibilol sebire rola lunie. Ifosamac rapieco him oku, vimeror eralerie puredus elacecos tusorop gobas oliw gepalar."
和 $result="Kapa[rand2]dim[mailingid]nen[rand2]ma[rand1]sibilol[rand1][mailingid]sebire [rand1]rola[rand2]lunie.Ifosamac[mailingid]rapieco[rand1]him[rand1] [mailingid]oku,[rand1]vimeror[mailingid]eralerie[mailingid]puredus[hashx]elacecos[rand1]tusorop[rand1][mailingid]gobas[rand1]oliw[mailingid]gepalar。”
其中随机值为“[mailingid],[rand1],[rand2],[hashx]”
请给我php代码....