Avatar of AlexPonnath
Flag for United States of America

asked on 

PHP substring

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"


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

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon