Quantcast
Channel: DaniWeb Solved Topics
Viewing all articles
Browse latest Browse all 576

Manupilating a string in PHP

$
0
0

Hello everyone. I have a string that looks like this

(Mango, fruits, and), (Maize, cereals, and), (Mango juice, beverages, and)

I would like to convert the above string using php to something similar to this:

(Mango[fruits]) AND (Maize[cereals]) AND (Mango juice[beverages])

How can i achieve this in php. I have looked at PHP string replace, substr functions but cannot figure out how to use them to solve my problem. Thanking you in advance


Viewing all articles
Browse latest Browse all 576

Latest Images

Trending Articles



Latest Images