How do I break apart a string to its individual parts using php?

Glenn

Member
If I have the string "Now is the time", how do I create 4 strings, $string1 = "Now", $string2 = "is", etc.

Also, how do I know how many strings there are? I guess this needs to be set up in an array. However it needs to be done.
 
You create an array of string. The use a substring(). Use the substring function with a parameter for a delimiter. Then make " " as your delimiter.
 
Top