Jump to content

PHP quesion - why are my strings changed when outputed?


phpjitsu

Recommended Posts

I suspect there is a very easy answer, but am having a hard time finding it.

 

I have a fairly simple PHP page that spits out a bunch of html with a youtube video in the middle.

The youtube URL is fetched from the database but something is wrong.

It doesnt show in the browser and when I view the page src code from the browser, it has changed characters like & to &.

 

Example.

 

-----------------

 

<embed src="<?php echo $datarecord->youtubeURL;?>&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>

 

 

 

This gets mangled and looks like this in the browser:

 

<embed src="

&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>

 

What causes this? How do I stop it?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.