<?php $match = 'today'; $n = 2; for ($pos = strlen($match) - $n; $pos >= 0; --$pos) { $nGrams[] = substr($match, $pos, $n); } var_export($nGrams);
You have javascript disabled. You will not be able to edit any code.