Jump to content

How to replace one instance in a string instead of all?


jeturman

Recommended Posts

I'm working with a database of 97,000 Russian words in MySQL.  In another column is code that tells me where the accent falls on the word.  I want to insert the accent mark in the right place. So in some cases I want to replace the first vowel with vowel + accent mark.  In other cases it'll be the second or third vowel.  Can I use str_replace to search for the first, second, or third vowel and replace just that one instance?  Any other ideas would be appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.