I have a string that looks something like this:
abc-def-ghi-jkl-mno-pqr-stu-vwx-yz
I'd like to get the content BEFORE the 4th dash, so effectively, I'd like to get abc-def-ghi-jkl
assigned to a new string, then I'd like to get mno
assigned to a different string.
How could I go about doing this? I tried using explode
but that changed it to an array and I didn't want to do it that way.