$ones = "1";
$numbers = "012345678910";
// do not quote the variables if you use them
// requires 3 arguments, what do you replace ones with?
// a string containing a *
$no_ones = str_replace($ones, '*', $numbers );
// is the equivalent of :
// $no_ones = str_replace('1', '*', $numbers );
echo $no_ones;
// 0*23456789*0
You need to study the examples in the online manual very carefully : [fphp]str_replace[/fphp]