-
Jun 15th, 2015, 07:56 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] width and height
hello,
how would i display the height and width for an imaghe in my code tried everything but cant seem to get it to work this is the code i have?.
PHP Code:
<?
$path = "news_pics/$post_image";
echo "<img src=\"".((file_exists($path)) ? $path : "") . "\" />";
?>
come back and mark your original post as resoved if your problem is fixed
Jamie Garland
-
Jun 15th, 2015, 11:09 AM
#2
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jun 15th, 2015, 11:12 AM
#3
My usual boring signature: Something
-
Jun 15th, 2015, 11:12 AM
#4
Re: width and height
Dang you beat me to it. I had the page open while you posted it.
My usual boring signature: Something
-
Jun 15th, 2015, 11:14 AM
#5
Re: width and height
Originally Posted by dclamp
Dang you beat me to it. I had the page open while you posted it.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jun 15th, 2015, 12:52 PM
#6
Thread Starter
Frenzied Member
Re: width and height
Hello I ment the height to be 160 width 160?
come back and mark your original post as resoved if your problem is fixed
Jamie Garland
-
Jun 15th, 2015, 01:49 PM
#7
Re: width and height
Originally Posted by Jamie_Garland
Hello I ment the height to be 160 width 160?
Code:
<?php
$path = "news_pics/" . $post_image;
echo '<img src="' . ( file_exists($path) ? $path : '' ) . '" style="width:160px; height:160px;" />';
?>
You mean like this?
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|