Voting

: max(two, six)?
(Example: nine)

The Note You're Voting On

glueck at dozent dot net
3 months ago
MessageFormatter::formatMessage(string $locale, string $pattern, array $values)

or

msgfmt_format_message(string $locale, string $pattern, array $values)

can be an alternativ option:

$values = ['rank'=>10, 'name'=>'Frank']

MessageFormatter::formatMessage('en', 'Hello {name}, your rank is {rank}', $values);

Also access by index is possible "{1}", formating and a lot more.

https://unicode-org.github.io/icu/userguide/format_parse/numbers/

<< Back to user notes page

To Top