I have a $line='boy boy girl boy girl boy girl girl'; I want to replace 'boy' with 'man', but I don't want to replace all the 'boy's, I only want to replace (randomly) one of the 'boy' with 'man'. How do I do that? I have a feeling that it has something to do with pos() but I really don't know exactly how?