sprintf()
returns a string, printf()
displays it.
The following two are equal:
printf(currentDateTime());
print sprintf(currentDateTime());
More Related Contents:
- Rounding to nearest fraction (half, quarter, etc.)
- PHP sprintf escaping %
- vsprintf or sprintf with named arguments, or simple template parsing in PHP
- Why use sprintf function in PHP?
- xss attack on a php page
- Creating sign-in with my site functionality
- How to access and manipulate multi-dimensional array by key names / path?
- Is there a function to extract a ‘column’ from an array in PHP?
- Allow php sessions to carry over to subdomains
- What does the variable $this mean in PHP?
- How to POST JSON Data With PHP cURL?
- How to implement authorization using a Telegram API?
- Search with comma-separated value mysql
- Remove multiple whitespaces
- Sort PHP multi-dimensional array based on value in inner array? [duplicate]
- How to do left join in Doctrine?
- PHP Regular expression to match keyword outside HTML tag
- PHP: Check if a file is loaded directly instead of including?
- Sanitizing user’s data in GET by PHP [duplicate]
- file_get_contents behind a proxy?
- How do I install the ext-curl extension with PHP 7?
- PHP Mail, CC Field
- Is it possible to create static classes in PHP (like in C#)?
- Get current domain
- 413 Request Entity Too Large – File Upload Issue
- Check if value isset and null
- PHP Warning: exec() unable to fork
- Passing data from controller to view in Laravel
- Difference between array_push() and $array[] =
- Using SQlite3 in PHP how to count the number of rows in a result set?