I need to select a portion of a string. I know the start and end point of the string (found using strpos) but I don’t know how to select this portion of the string….substr won’t work as the string can be different lengths. I need to be able to truncate the string by saying start at this character and end at this character.
I’m sure there’s a way to do this but can’t seem to finds it in the manual
As already mentioned substr is perfectly fine.
I am writing this answer just to provide you with example (as it seems you are a bit confused)
Hope that helps you out 🙂