How to rewrite sections of a meta field seperated by a comma


Is there a PHP method to rewrite a custom meta field value for a post, looking for and replacing certain phrases?

For example,

meta_field= "user 1,user 2,user 3"

I want to send a post request in PHP to "for example" make it

meta_field= "user 1,user 2,user 3,user 4"


meta_field= "user 1"
Ali Hamdan 2 months 0 Answers 15 views 0

Leave an answer