Skip to content

Instantly share code, notes, and snippets.

@chris-huffman
Created June 5, 2019 15:03
Show Gist options
  • Save chris-huffman/acdcd35ddd5130e5544ab51811eb2ef9 to your computer and use it in GitHub Desktop.
Save chris-huffman/acdcd35ddd5130e5544ab51811eb2ef9 to your computer and use it in GitHub Desktop.
Split a string in php
$array = preg_split("/\r\n|\n|\r/", $string);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment