since PHP 7.4 curly braces method to get individual characters inside a string has been deprecated, so change the above syntax into this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$array = array(); $i = 0; while ($i < $len) { $key = NULL; for ($j = 0; $j < $split; $j += 1) { $key .= $text{$i}; $i += 1; } $array[] = $key; } return $array; |
Modify
1 2 3 |
$key .= $text[$i]; // modify |
댓글