Created
March 4, 2015 18:07
-
-
Save atsea/9a4504851a1b4d69584a to your computer and use it in GitHub Desktop.
php - sprintf example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$string = <<<EOHTML | |
<section id="anniversary_mobile" class="row"> | |
<div class="four columns"> | |
<figure> | |
<img class="head hires" src="%s15-years-15mobile.png" width="246" height="185" alt="Celebrating 15 years of blowing customers minds"> | |
</figure> | |
</div> | |
</section> | |
EOHTML; | |
$string = sprintf($string, IMG); | |
echo $string; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment