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?

 

 

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.