Questions tagged [explode]

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

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

array explode ( string $delimiter , string $string [, int $limit ] )

Example

$text = "a b c d";
print_r(explode(" ", $text));

gives:

Array ( [0] => a [1] => b [2] => c [3] => d )
2123 questions
0
votes
1 answer

How can I echo a new row for each item in an array?

I have tried searching other questions, but nothing seems to address this problem. I have an inventory report that displays each product number along with the quantity and the warehouse it is located in. The problem is, some products have multiple…
Purple Lady
  • 481
  • 5
  • 15
0
votes
1 answer

Variables are not passed correctly using list function(?)

Here's a snippet I use the gather some data in JSON from a URL specifying 2 variables: "PRO", 'codiceente' => "011120674", ); …
MultiformeIngegno
  • 6,959
  • 15
  • 60
  • 119
0
votes
1 answer

Get nth number from a string

I have a very large file with only single line. It contains about 2.6 million of numbers. The file is about 15 mb. My goal is to find the nth number in this single line string. I tried to read the file into a string (remember it is single line…
Frank
  • 11
  • 2
0
votes
2 answers

POST two values and retrieve result of php function onchange

Test