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