# Images

**URL:** <https://forum.kirupa.com/t/images/185697>\
**Category:** Uncategorized\
**Created:** [April 15, 2006, 4:05pm UTC](https://forum.kirupa.com/t/images/185697 "2006-04-15T16:05:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![arturo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/arturo/32/761_2.png) [@arturo](https://forum.kirupa.com/u/arturo)\
**Post date:** [April 15, 2006, 4:05pm UTC](https://forum.kirupa.com/t/images/185697/1 "2006-04-15T16:05:09Z")

</div>

Hi there, I’m tryint to call an image if the image row is empty in the database, if not, call the image route sotred in the data base I’m using this

\<?php  
if ($row\_rsDetails[‘RestaurantLogo’]=="" || $row\_rsDetails[‘RestaurantLogo’] == NULL)  
echo “\<img src=images/logos/nologo.gif\>”;  
else  
echo “\<img src=“echo $row\_rsDetails[‘RestaurantLogo’];”\>”;  
?\>

but I get this

**Parse error** : parse error, expecting `','' or`‘;’’ in **/Library/WebServer/Documents/mark/details.php** on line \*\*33

\*\*line 33 is echo “\<img src=“echo $row\_rsDetails[‘RestaurantLogo’];”\>”;

what am I doing wrong?

Thanks guys

Arturo

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [April 15, 2006, 4:23pm UTC](https://forum.kirupa.com/t/images/185697/2 "2006-04-15T16:23:48Z")

</div>

```php
echo "<img src="echo $row_rsDetails['RestaurantLogo'];">";

```

When you use double quotes inside double quotes (or single quotes inside single quotes) you need to delimit the quotes that you wish to display.

So you like could look like:

```php
echo "<img src=\"$row_rsDetails['RestaurantLogo']\">";

```

Or:

```php
echo '<img src="' . $row_rsDetails['RestaurantLogo'] . '">';

```

---

<div class="post-metadata">

**Author:** ![arturo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/arturo/32/761_2.png) [@arturo](https://forum.kirupa.com/u/arturo)\
**Post date:** [April 15, 2006, 4:27pm UTC](https://forum.kirupa.com/t/images/185697/3 "2006-04-15T16:27:37Z")

</div>

> [@Ankou](#):
>
> ```php
> echo "<img src="echo $row_rsDetails['RestaurantLogo'];">";
> 
> ```
> 
> When you use double quotes inside double quotes (or single quotes inside single quotes) you need to delimit the quotes that you wish to display.
> 
> So you like could look like:
> 
> ```php
> echo "<img src=\"$row_rsDetails['RestaurantLogo']\">";
> 
> ```
> 
> Or:
> 
> ```php
> echo '<img src="' . $row_rsDetails['RestaurantLogo'] . '">';
> 
> ```

thanks a lot, many thanks!!, just one thing, how I can place the size of the image? because my image is kinda’ big I’ll like to place something like 80x53 pxls, my code now is

\<?php  
if ($row\_rsDetails[‘RestaurantLogo’]==“” || $row\_rsDetails[‘RestaurantLogo’] == NULL)  
echo “\<img src=images/logos/nologo.gif\>”;  
else  
echo ‘\<img src="’ . $row\_rsDetails[‘RestaurantLogo’] . ‘"\>’;  
?\>

thanks Ankou

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [April 15, 2006, 7:47pm UTC](https://forum.kirupa.com/t/images/185697/4 "2006-04-15T19:47:27Z")

</div>

are you basiclaly looking to resize the large image or are you going to make a separate thumbnail file? i would recommend making a thumbnail over resizing the large image b/c you will cut down on bandwidth drastically.

---

<div class="post-metadata">

**Author:** ![arturo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/arturo/32/761_2.png) [@arturo](https://forum.kirupa.com/u/arturo)\
**Post date:** [April 15, 2006, 7:54pm UTC](https://forum.kirupa.com/t/images/185697/5 "2006-04-15T19:54:15Z")

</div>

> [@bwh2](#):
>
> are you basiclaly looking to resize the large image or are you going to make a separate thumbnail file? i would recommend making a thumbnail over resizing the large image b/c you will cut down on bandwidth drastically.

oh no, my image is 150x100 but that page is a search detail so I need the image reduced in order to fit in the page to 80x53, I know there’s a way to place the size in the img tag, but don’t know how to do this with this treatment but is not working:

\<?php  
if ($row\_rsDetails[‘RestaurantLogo’]==“” || $row\_rsDetails[‘RestaurantLogo’] == NULL)  
echo “\<img src=images/logos/nologo.gif\>”;  
else  
echo ‘\<img src="’ . $row\_rsDetails[‘RestaurantLogo’] . ‘" width=“80” height=“53”\>’;  
?\>

thanks a lot!!

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [April 15, 2006, 8:05pm UTC](https://forum.kirupa.com/t/images/185697/6 "2006-04-15T20:05:15Z")

</div>

```php

echo '<img src="' . $row_rsDetails['RestaurantLogo'] . '" width="80" height="53">';

```

^this should work. are you getting an error message or what is the screen displaying that lets you know it’s not working?

---

<div class="post-metadata">

**Author:** ![hl1](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/hl1/32/849_2.png) [@hl1](https://forum.kirupa.com/u/hl1)\
**Post date:** [April 15, 2006, 8:07pm UTC](https://forum.kirupa.com/t/images/185697/7 "2006-04-15T20:07:10Z")

</div>

> [@arturo](#):
>
> oh no, my image is 150x100 but that page is a search detail so I need the image reduced in order to fit in the page to 80x53, I know there’s a way to place the size in the img tag, but don’t know how to do this with this treatment but is not working:
> 
> \<?php  
> if ($row\_rsDetails[‘RestaurantLogo’]==“” || $row\_rsDetails[‘RestaurantLogo’] == NULL)  
> echo “\<img src=images/logos/nologo.gif\>”;  
> else  
> echo ‘\<img src="’ . $row\_rsDetails[‘RestaurantLogo’] . ‘" width=“80” height=“53”\>’;  
> ?\>
> 
> thanks a lot!!

```php
<?php
if ($row_rsDetails['RestaurantLogo']=="" || $row_rsDetails['RestaurantLogo'] == NULL){
echo "<img src=images/logos/nologo.gif>";
}
else{
echo '<img src="' . $row_rsDetails['RestaurantLogo'] . '" width="80" height="53">';
}
?>

```

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [April 15, 2006, 8:11pm UTC](https://forum.kirupa.com/t/images/185697/8 "2006-04-15T20:11:16Z")

</div>

btw arturo, you should use the [noparse]

```php
here's my php code

```

[/noparse] tags so that your code is sectioned off and color coded.

---

<div class="post-metadata">

**Author:** ![arturo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/arturo/32/761_2.png) [@arturo](https://forum.kirupa.com/u/arturo)\
**Post date:** [April 15, 2006, 8:14pm UTC](https://forum.kirupa.com/t/images/185697/9 "2006-04-15T20:14:35Z")

</div>

> [@bwh2](#):
>
> btw arturo, you should use the [noparse]
> 
> ```php
> here's my php code
> 
> ```
> 
> [/noparse] tags so that your code is sectioned off and color coded.

hi there, well, I’m not getting any error, but the image it’s at full size

(-:

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [April 15, 2006, 8:17pm UTC](https://forum.kirupa.com/t/images/185697/10 "2006-04-15T20:17:10Z")

</div>

when you view the resulting html, what is the output?

---

<div class="post-metadata">

**Author:** ![arturo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/arturo/32/761_2.png) [@arturo](https://forum.kirupa.com/u/arturo)\
**Post date:** [April 15, 2006, 8:25pm UTC](https://forum.kirupa.com/t/images/185697/11 "2006-04-15T20:25:33Z")

</div>

check this

[www.videoestudio.net/mark](http://www.videoestudio.net/mark)

then click on West Palm Beach button

Thanks bwh2!
