I found here many responses for my question but I cat’t find exactly what I am looking for.
I have to remove every 4th digit from an array, but beginning and the end making a circle, so If I remove 4th digit in next loop It’s gonna be another digit (maybe 4th maybe 3rd) It’s depend how many digit we have in string
$string = "456345673474562653265326";
$chars = preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY);
$result = array();
for ($i = 0; $i < $size; $i += 4)
{
$result[] = $chars[$i];
}
Output: