development:php:regex

Action disabled: index

Split string using RegEx

$cols=preg_split('/(?<="),(?=")/', trim($row));
// Loop through items
foreach ($cols as $col) {
 echo $col;
}

make sure to add / to the beginning and the end of your RegEx expression

Enter your comment:
199 +1 = 
 
  • development/php/regex.txt
  • Last modified: 2019/10/31 09:05
  • by 127.0.0.1