Jump to content

& inside variable


Guest

Recommended Posts

this is how im using it.
[code]$address = "$website/view.php?id=$hid&image=1"; [/code]
when it trys to get the image is uses & where the & sign is

im just using echo and its doing this why is that?
Link to comment
Share on other sites

[code]$simage = "" . $website . "/inc/view.php?type=house&id=$hid&image=1&hei=100&wid=100";[/code]


[code]echo "<td rowspan='5' align='left' width='100'><a href='Details.php?hid=$hid' border='0'><img src='$simage' border='0'></a></td>\n";[/code]
Link to comment
Share on other sites

[quote author=jeff8j link=topic=121948.msg502625#msg502625 date=1168554127]
[code]$simage = "" . $website . "/inc/view.php?type=house&id=$hid&image=1&hei=100&wid=100";[/code]
[/quote]

That first "" . is superfluous.

This is a pretty wacky problem. That is your exact code? You're not running any functions on the string, or getting it from a db, etc?
Link to comment
Share on other sites

[quote author=jeff8j link=topic=121948.msg502672#msg502672 date=1168556424]
Yes i see it in the source. No i dont have a website to access it right now.
[/quote]

He asked what do you see in the source :-P

I know there are some restrictions on what html can be used inside of a table cell. What happens if you print it outside of a cell?
Link to comment
Share on other sites

I tested this very short script to see if I could duplicate the problem:
[code]<?php
echo '<a href="http://www.example.com/index.php?x=1&y=2&z=3&amp;a=ten">
<img src="http://www.example.com/img.php?x=1&y=2"</a>';
?>[/code]

I couldn't.

Could you see you this script causes the problem on your server?

Ken
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.