soundex() function in PHP

PHPProgrammingServer Side Programming

The soundex() function in PHP is used to calculate the soundex key of string. The key is a four character long alphanumeric string representing English pronunciation of a word.

Syntax

soundex()

Parameters

  • NA

Return

The soundex() function returns the soundex key as a string.

Example

The following is an example −

Live Demo

<?php
   $res = "Welcome"; 
   echo soundex($res);
?>

Output

W425
raja
Updated on 30-Jul-2019 22:30:23

Advertisements