Wednesday, 24 August 2011

How to break a string into an array in PHP?

There are two method used to break a string in to an array:

  1. split(): split() can break string in an array by given string separator or given regular expression.

  2. explode(): explode() function can only break the string by given separator.


 

No comments:

Post a Comment