I need a bit of help on this. Often I need to remove certain duplicated characters but only specific ones. Like in "fgg agg ---------g hhhhhh" I just need to reduce "---------" to "-".
Code: Select all
$a = "fgg agg ---------g hhhhhh"; $b = formatlist($a, d, ""); echo $b;Code: Select all
$a = "fgg agg ---------g hhhhhh"; replace $a, $a, "--", "-"; echo $a;As the size of repetitions vary I can't just do a replace $a, $a, "---------", "-";
Please advice.
XYplorer Beta Club