1. Home
  2. Php
  3. Sprintf

Lets you format a string and combine it with variables.

#php
$day = date("l");
$year = date("Y");

echo sprintf('Current year: %s. Current day %s', $year, $day);
copy
Full Php cheatsheet