How to explode the string back from the second or third string delimiter?
问题 How can I get the 800-555 from this 800-555-5555 with explode() ? Here is a good example: $rawPhoneNumber = "800-555-5555"; $phoneChunks = explode("-", $rawPhoneNumber); First chunk = $phoneChunks[0]; //800 Second chunk = $phoneChunks[1]; //555 Third Chunk chunk = $phoneChunks[2]; //5555 But how can I get the 800-555? Okay, I see, here need more comment... So, this is only an example... In real I add a word (now $word) to string delimiter and my string is a full article... I want that, if