Top "Explode" questions

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

Explode comma separated integers to intvals?

Say I have a string like so $thestring = "1,2,3,8,2". If I explode(',', $thestring) it, I get an array of …

php integer explode
Convert backslash-delimited string into an associative array

I have a string like this: key1\value1\key2\value2\key3\value3\key4\value4\key5\value5 And I'd like it …

php arrays string associative-array explode
PHP array and implode with blank/null values

I have a array which i generated by values in a database, the example is below: $addressarray = array($results['client']…

php arrays explode implode
In PHP, which is faster: preg_split or explode?

This may sound like a stupid question, but: which is faster when using it to extract keywords in a search …

php explode preg-split
Remove part of an NSString

I have an NSString as follows: <img alt="996453912" src="http://d2gg0uigdtw9zz.cloudfront.net/large/996453912.jpg" />&…

ios4 nsstring substring explode
PHP explode and assign it to a multi-dimensional array

i want to explode a string two time and make a multi-dimensional array. $data = "i love funny movies \n i …

php arrays multidimensional-array explode
Explode a paragraph into sentences in PHP

I have been using explode(".",$mystring) to split a paragraph into sentences. However this doen't cover sentences that have been …

php string explode text-segmentation
Get first string before separator?

I have strings with folowing structure: 7_string_12 7_string2_122 7_string3_1223 How I can get string before second "_" ? I want my final …

php string explode separator
explode two-item-list in array as key=>value

I'd like to explode a multi-line-string like this color:red material:metal to an array like this $array['color']=red $…

php arrays explode
PHP: Explode textarea lines as separate array element

I have a textarea that contains phone numbers, each number in a separate line. I want to explode that string …

php textarea explode