Created
July 18, 2014 23:39
-
-
Save abeyang/9423c317a4d80948b764 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
$var = 3; | |
echo $var; | |
echo 'I am a string'; | |
echo "I am a string"; | |
echo 'I am $var'; //output: I am $var | |
echo "I am $var"; //output: I am 3 | |
echo 'I am ' . $var; //output: I am 3 | |
echo 'I ' . 'am ' . 'a '; | |
echo 'I am a'; | |
for($i=1; $i<5; $i++) { | |
//echo '<div class="asdfasdf">all my html is inside an echo</div>' // BAD! | |
?> | |
<div class="row<?php echo $i?>"> | |
<div class="card"> | |
<img src="flickr_url.jpg"> | |
</div> | |
</div> | |
<?php | |
} // close for loop | |
?> | |
<?php | |
$arr = array('flickr_url1.jpg','flickr_url2.jpg','flickr_url3.jpg') | |
cols(array('flickr_url1.jpg','flickr_url2.jpg','flickr_url3.jpg')) | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment