# Problem with echo " and '

**URL:** <https://forum.kirupa.com/t/problem-with-echo-and/238447>\
**Category:** Uncategorized\
**Created:** [September 11, 2007, 2:21pm UTC](https://forum.kirupa.com/t/problem-with-echo-and/238447 "2007-09-11T14:21:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ht56y](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ht56y/32/3583_2.png) [@ht56y](https://forum.kirupa.com/u/ht56y)\
**Post date:** [September 11, 2007, 2:21pm UTC](https://forum.kirupa.com/t/problem-with-echo-and/238447/1 "2007-09-11T14:21:16Z")

</div>

Hi

I have a image gallery, in which i for each cell use a script to change the background of the cell, and it works fine as long as i keep it in html.

But i’m converting my gallery to php now, and im getting a problem with the code.

When i echo in php, i use " to enclose the echoed statements, and convert all statements within to use ’ instead of ".

This makes the code to change the cell bg not to react on rollover

Example:

_When i echo this in php, it dosen’t have the rollover. it works fine in plain html:_

> echo “\<td height=‘80’ onmouseover=“this.style.backgroundColor=‘#676c58’;” onmouseout=“this.style.backgroundColor=‘#383b30’;” align=‘center’\>\<a href=‘#’\>\<img src=‘Billeder/Thumbs/tmb05.jpg’ width=‘70’ height=‘70’ border=‘0’ /\>\</a\>\</td\>”

I think it’s a problem with the ’ and the " signs.

Do you have a solution or a work around, it would be much appreciated.

Thanks in advance.
