Tag Archives: Functions

sscanf()

It parses input from a string according to a format

Example

<?php
$string = “first:php second:code”;
sscanf($string,”%s%s”,$first,$second);
echo $first.$second;
?>

Output

first:phpsecond:code

soundex()

It calculates the  soundex key of a string

  • A soundex key is a four character long alphanumeric string that represent English pronunciation of a word.
  • The soundex() function can be used for spelling applications.
  • The soundex() function creates the same key for similar sounding words.

Example

<?php
 echo soundex("phpcode");
 ?>

Output

P123