Skip to content

Tag: PHP

PHP: Building a “Did you mean X?” suggestion engine using the levenshtein function

Explore how to use PHP’s built-in levenshtein function to calculate the closest match between an input value and an array of ‘allowed’ values, as seen in command line tools like WP-CLI or Artisan.

Leave a Comment