I have a paragraph ..i want to spaces are replace with some randam values.
for example
$string=”Kapa dim nen ma sibilol sebire rola lunie. Ifosamac rapieco him oku, vimeror eralerie puredus elacecos tusorop gobas oliw gepalar.”
and
$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.”
where Randam values are “[mailingid],[rand1],[rand2],[hashx]”
please give me php code ….
You can use the function
rand():Or did you mean a random value from your list? In this case: