Yer tutucuların sprintf kullanımı
Code: Select all
<?php
$num =5;
$location = 'tree';
$format = 'There are %d monkeys in the %s';
echo sprintf($format, $num, $location);
?>
Code: Select all
Ağaçta 5 maymun var
Code: Select all
$data1 = $_Post["name"];
$data2 = $_Post["number"];
$sonuc = <<< 'EOT'
%s
EOT;
$data2B = sprintf($sonuc, $data2);