I'm working on small PHP project.

i have data in following text

COMPANYgreenwayLOCATIONmumbaiPHONENO2222457sÿû)wÕ !$&),.0368:=@BEHJMORTWY\_acgikmqsux{}€‚…‡ŠŒ’”—šœž¡¤¦¨«®°²µ¸º½ÀÂÅÇÊÍÏÑÔ×ÙÛßáãæéëíðóõ6r¯€$ÀF€CwÕ_âT

useful values i want to get from text

COMPANYgreenway
LOCATIONmumbai
PHONENO2222457

remaining text is useless for me

i want to store those values in database
so what i need to do to get those values..?

If COMPANY LOCATION and PHONE are all mandatory fields that will always appear in this order, then I would search the string for those literals and get the position of each. You can then determine the position and length of the company name and the location. For the phone number you will know where it starts and the length should be fixed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.