Dear Googler , If you are googling how to display image via php code, You are in right Place
Here. Though its very much single line command , its usage in php is very much high.In html if we need to display image we open html tag as :
“<img src=”http://nepallica.com/image/nepallica.jpeg>”
Where http://nepallica.com/image/nepallica.jpeg is path where image stored.
For this same code,if you want to embed with in your php tag,Here is the code you need to do in your Project.
Correct way:
“<?php echo ‘<img src=”http://nepallica.com/image/nepallica.jpeg” height=”10″ width=”10″>’; ?> ”
The most common mistake we made in this tag is confusion between “” and ”.
So If we Place code like below:
“ <?php echo “<img src=”http://nepallica.com/image/nepallica.jpeg” height=”10″ width=”10″>”; ?> ”
This is the wrong way. You need to replace “” at the beginning and end of echo tag.

“<img src=”http://nepallica.com/image/nepallica.jpeg>”
Where http://nepallica.com/image/nepallica.jpeg is path where image stored.
For this same code,if you want to embed with in your php tag,Here is the code you need to do in your Project.
Correct way:
“<?php echo ‘<img src=”http://nepallica.com/image/nepallica.jpeg” height=”10″ width=”10″>’; ?> ”
The most common mistake we made in this tag is confusion between “” and ”.
So If we Place code like below:
“ <?php echo “<img src=”http://nepallica.com/image/nepallica.jpeg” height=”10″ width=”10″>”; ?> ”
This is the wrong way. You need to replace “” at the beginning and end of echo tag.
No comments:
Post a Comment