Run ❯
Get your
own PHP
server
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <?php $str = "If you divide 4 by 2 you'll get 2"; $format = sscanf($str,"%s %s %s %d %s %d %s %s %c"); print_r($format); ?> </body> </html>
Array ( [0] => If [1] => you [2] => divide [3] => 4 [4] => by [5] => 2 [6] => you'll [7] => get [8] => 2 )