I have a string filled with numbers and i'm trying to add a character to the front of every number series:
$dna = "273385 14093 1522520 1759 277697 283096 1133193 191835 246752 204984 973590"
but I want to end up with:
$dna = "m#273385 m#14093 m#1522520 m#1759 m#277697 m#283096 m#1133193 m#191835 m#246752 m#204984 m#973590"
the closest I've gotten is using
$dna= preg_replace('~(\w+)~', '$1m#',$dna);
which gives me:
$dna = "273385m# 14093m# 1522520m#"
How can I get it to append to the front?