We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

PHP string replace

Medium Priority
312 Views
Last Modified: 2012-05-11
Hello experts!

I want to use php to convert the below string from Before to After. The problem is that the below string is not always the same information. However, the information will always come in the same format. Is there an easy way with str_replace to do this?

BEFORE:
Photo name: ___________________ Open House Jane White BOONE county zionsville 1428 DOMINION DR 2-5 $184,900 3 Bedrooms / 2 Full,  Half Baths 846-7751 (Condominium) - 21106026 Special Financing:  

AFTER:
4/17/2011,2-5,21106026, Jane White
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Dave BaldwinFixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Most Valuable Expert 2011
Author of the Year 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thank you experts. This gave me exactly what I needed to parse the file.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.