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
- Dyn365GP3 February 2024SQL Query on Matomo Database to Calculate the Number of Visits to Each Page
- Dyn365GP2 February 2024New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1: Use Virtual Tables to Expose More Business Central Data in Dataverse
- Dyn365GP2 February 2024New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1: Manage Work Orders in Field Service, Invoice Them in Business Central
- Dyn365GP2 February 2024In Microsoft Dynamics 365 Business Central (Inventory and Warehouse Management), how do I… Manage Consignment Stock at a Customer Location