Код: Выделить всё
$str = "Str 1: %s - Str 2: %s - Str 2 again: %s";
Код: Выделить всё
echo sprintf($str, "I'm string 1", "My name is string 2");
Код: Выделить всё
Str 1: I'm string 1 - Str 2: My name is string 2 - Str 2 again: My name is string 2
Подробнее здесь: https://stackoverflow.com/questions/767 ... of-sprintf
Мобильная версия