About 966,000 results
Open links in new tab
  1. php - Split a comma-delimited string into an array? - Stack Overflow

    I need to split my string input into an array at the commas. Is there a way to explode a comma-separated string into a flat, indexed array? Input: 9,[email protected],8 Output: ['9', …

  2. Split a comma delimited string into an array in PHP

    Sep 10, 2024 · This PHP script uses str_getcsv() to parse the comma-delimited string $string into an array, handling CSV formatting rules like quoted values with commas, and outputs the …

  3. PHP explode() Function - W3Schools

    The explode() function breaks a string into an array. Note: The "separator" parameter cannot be an empty string. Note: This function is binary-safe.

  4. How to split string by comma in PHP? - Tutorial Kart

    In this PHP tutorial, you shall learn how to split a given string by comma separator using explode () function, with example programs. To split a string by comma delimiter in PHP, use explode() …

  5. How to Convert Comma String to Array in PHP - Tutorialdeep

    To convert comma string to array in PHP, you have to use the explode() function. You can also use the preg_match() function of PHP to change comma-separated strings into an array. Both …

  6. Convert Comma Separated String into Array in PHP

    In this tutorial, you will see the simple PHP code snippets which can convert any comma separated string into an array using PHP explode function.

  7. How to convert items in array to a comma separated string in PHP ...

    Jun 7, 2012 · How to create comma separated list from array in PHP? Given this array: $tags = array('tag1','tag2','tag3','tag4','...'); How do I generate this string (using PHP): $tags = 'tag1, …

  8. PHP explode(): Split a String by a Separator into an Array of Strings

    In this tutorial, you'll learn how to use the PHP explode() function to split a string by a separator into an array of strings.

  9. How to Split String by Delimiter/Separator in PHP?

    Sep 9, 2024 · Example: In this example we splits a string into an array using a regular expression to match commas, then outputs each element of the array in a loop. The strtok () function in …

  10. PHP - Split a String into Array with Delimiter - TecAdmin

    Apr 26, 2025 · The PHP `explode()` function is a useful tool for splitting a string into an array based on a delimiter in PHP. You can use it in various scenarios, such as when you want to …

  11. Some results have been removed
Refresh