With a string $string1 = "One Two Three", I need to create an array like this $desiredarray = ("One Two Three", "One", "Two", "Three")
PHP - Need help with Array and Explode
3
With a string $string1 = "One Two Three",
I need to create an array like this $desiredarray = ("One Two Three", "One", "Two", "Three")
I can create an array ("One", "Two", "Three"), by $words = explode($string1).
How do I combine $string1 and $words to get $desiredarray?
Thanks.
I need to create an array like this $desiredarray = ("One Two Three", "One", "Two", "Three")
I can create an array ("One", "Two", "Three"), by $words = explode($string1).
How do I combine $string1 and $words to get $desiredarray?
Thanks.
- Arine Mark
- [1] reply
- Khai Lay
Next Topics on Trending Feed
-
3