One thought on “How to Split a string in php

  1. Hello Jason

    You need to use a PHP built-in function called explode. For example

    $parts = explode('.', $string);

    You can also directly fetch parts of the result into variables:

    list($part1, $part2) = explode('.', $string);
     

Comments are closed.