http://qs321.pair.com?node_id=147895


in reply to dodgy sub

Try switching your parameters
print str_replace("Hello", "Hi", "Hello My Name Is Elfyn\n");
Also, since your implmentation of PHP's str_replace doesn't take 'mixed' value types (i.e strings, arrays, references etc), it's only a partial implmentation.
HTH

broquaint