All Go Rust Python PHP JavaScript
Chrome Dev Summit to secure your spot in workshops, office hours and learning lounges!

How to format a string in PHP

Formatting PHP Strings with printf and sprintf. Using sprintf Function The sprintf() return a formatted string. sprintf(string $format, mixed ...$values): string // iPhone 14 Pro echo sprintf("%s %d Pro\n", "iPhone", 14); // iPhone 14 Pro prin...