troubleshooting Question

PHP substring

Avatar of AlexPonnath
AlexPonnathFlag for United States of America asked on
PHP
3 Comments1 Solution194 ViewsLast Modified:
i have a field which stores a string for example like this "7379-TNCI-OP-CO - CA"

i need to get this into 2 Strings  [1] = "7379" and [2] = "TNCI-OP-CO - CA"

Problem is when i use below i get  [1] = "7379" and [2] = "TNCI"

$ocnInfo=explode("-",$resultantData[7]);

So is there a better way to do that ? i know that the first element is always the 4 nbr's flowed by "-" so looking for some flexible solutions
ASKER CERTIFIED SOLUTION
gr8gonzo
Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros