How do I show the image instead of the url?
echo "<b>Image: </b> http://graph.facebook.com/" . $posts['from']['id'] ."/picture?type=large</br>";
How do I show the image instead of the url?
echo "<b>Image: </b> http://graph.facebook.com/" . $posts['from']['id'] ."/picture?type=large</br>";
Simply use the <img>
tag with src
set to your url:
echo "<b>Image: </b> <img src='http://graph.facebook.com/"
. $posts['from']['id'] ."/picture?type=large'></br>";
try:
echo "<b>Image: </b><img src='http://graph.facebook.com/" . $posts['from']['id'] ."/picture?type=large'/></br>";
<img src="http://graph.facebook.com/".$posts['from']['id']
."/picture?type=large">
这将构建正确的标签。
echo '<b>Image: </b> <img src="http://graph.facebook.com/' . $posts['from']['id'] . '/picture?type=large" /><br />';
或者,不使用串联:
<b>Image: </b> <img src="http://graph.facebook.com/<?php echo $posts['from']['id']; ?>/picture?type=large" /><br />
或使用短标签:
<b>Image: </b> <img src="http://graph.facebook.com/<?=$posts['from']['id']?>/picture?type=large" /><br />