- str_replace: documentation ( source)
- shuffle: documentation ( source)
- vprintf: documentation ( source)
<?php
$template = 'Searching the |*-*| Dating membership database is the key to locating |*-*| people
you would be interested in. You can search for |*-*| Singles including |*-*| Women
and |*-*| Men in any location worldwide. Join now to search for |*-*| Singles.';
$array = [
'Japan',
'Japanese',
'Tokyo',
'Yokohama',
'Osaka',
'Asian',
'Nagoya'
];
shuffle($array);
vprintf(str_replace('|*-*|', '%s', $template), $array);