Top "Explode" questions

explode() is a PHP function that splits a string based on a delimiter, returning an array.

Split a text by a backslash \ ?

I've searched for hours. How can I separate a string by a "\" I need to separate HORSE\COW into two …

php explode preg-split
Split into two variables?

Say I have the following: "44-xkIolspO" I want to return 2 variables: $one = "44"; $two = "xkIolspO"; What would be the best way …

php string parsing explode
Explode a string with line break

I am trying to break a string into an array using the explode function. I want it break the string …

php arrays variables explode
How to explode a multi-line string?

I have a string that has different values on each line: $matches="value1 value2 value3 value4 value5 "; I want to …

php explode
PHP: How can I explode a string by commas, but not wheres the commas are within quotes?

I need to explode my string input into an array at the commas. However the string contains commas inside quotes. …

php string explode
Multi word search in PHP/MySQL

I'm struggling to create a search that searches for multiple words. My first attempt yielded no results whatsoever and is …

php mysql search foreach explode
php explode new lines content from a txt file

I have txt file with email addresses under under the other like : [email protected] [email protected] So far …

php arrays explode
Can we do multiple explode statements on one line in PHP?

Can we do multiple explode() in PHP? For example, to do this: foreach(explode(" ",$sms['sms_text']) as $no) foreach(…

php explode
Explode contents of a txt file into array

I´m having trouble exploding contents of a .txt file (structure below): 01Name 1 02whatever contents 03whatever contents ------------------- 01Name 2 02whatever …

php arrays text-files explode
If you explode a string and said string does not contain the delimiter, does explode kick an error?

So I'm getting a section of the url with php. This section may or may not have trailing '?' …

php explode delimiter