This post is part of the PHP Snippets series where I will be covering the basics of developing in PHP.
The sprintf
function provides the same functionality as the printf function, but silently.
This means you would either need to echo the output or concatenate it with a string and echo that string.
$number = 500;
$string = 'miles';
echo sprintf( 'But I would walk %d %s', $number, $string );
Continue Reading azurecurve’s Article on their blog
PHP Snippets: Sprintf
This post is part of the PHP Snippets series where I will be covering the basics of developing in PHP. The function provides the same functionality as the printf function, but silently. This means you would either need to echo the output or concatenate it with a string and echo that string.
Blog Syndicated with azurecurve’s Permission
More About This Author
Array
- Dyn365GP26 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Restore an Environment to a Point in Time
- Dyn365GP25 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Restore a Deleted Environment
- Dyn365GP24 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Delete an Environment
- Dyn365GP23 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Delete a Company