Concept

How can you extract substrings from a string in PHP?

ComputerScienceOne / Arrays of Strings

"$name = \"Thomas Alan Waits\";\n\n$firstName = substr($name, 0, 6); //\"Thomas\"\n\n$middleName = substr($name, 7, 4); //\"Alan\"\n\n$lastName = substr($name, 12); //\"Waits\"\n\nIn the final example, omitting the optional length parameter results in the entire remainder of the string being returned as the substring."

Related Ideas

How can you extract substrings from a string in PHP? | ComputerScienceOne | Bifalgorithm | Bifalgorithm