Jump to content


& failing xhtml strict


7 replies to this topic

#1 tiki

    Young Padawan

  • Members
  • Pip
  • 259 posts
  • Gender:Male
  • Location:California

Posted 13 November 2005 - 10:27 PM

As the title says, how can I make & not fail.

Ive tried this

// Set & settings
ini_set('arg_separator.input','&');
ini_set('arg_separator.output','&');

bit it doesnt work.

#2 Donna

    Retired P2L Queen!

  • P2L Staff
  • PipPipPipPip
  • 12,330 posts
  • Gender:Female
  • Location:B.C Canada

Posted 13 November 2005 - 10:38 PM

Did you try changing to transitional?

#3 tiki

    Young Padawan

  • Members
  • Pip
  • 259 posts
  • Gender:Male
  • Location:California

Posted 13 November 2005 - 10:57 PM

Ive used that code before to pass xhtml strict and it worked, I dono why its not now.

Nope, I tend to stay to strict only.

#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 14 November 2005 - 05:22 PM

For your url's you don't need to do the ini_set().
I'm assuming you believe that would change all of your &'s automatically, which it won't.

You have to either run str_replace('&', '&', $the_code) on all of your code (ob_start would probably make it easier), or type & everywhere you want the amperstand to be, and validate.

Note: If you use it in the href attribute of an <a> tag, don't worry, the browser will automatically traslate it to &

#5 tiki

    Young Padawan

  • Members
  • Pip
  • 259 posts
  • Gender:Male
  • Location:California

Posted 14 November 2005 - 06:40 PM

The & isnt part of the php code

its jsut on eof my links like <a href="index.php?page=lol&view=2">

So thats how its used, ive tried ampersand in the links but it dont work. ill try the replace

#6 tiki

    Young Padawan

  • Members
  • Pip
  • 259 posts
  • Gender:Male
  • Location:California

Posted 14 November 2005 - 10:00 PM

How about, I change the urls with .htaccess since thats what im planning to do in the first place.

Do you know .htaccess?

#7 Chaos King

    Senior Programmer

  • P2L Staff
  • PipPipPip
  • 676 posts
  • Gender:Male
  • Location:Florida

Posted 14 November 2005 - 10:57 PM

tiki, on Nov 14 2005, 10:00 PM, said:

How about, I change the urls with .htaccess since thats what im planning to do in the first place.

Do you know .htaccess?
Im not expert at .htaccess mod rewrite but this should get the job done! :)

RewriteEngine On

RewriteRule ^page/(.*)/([0-9]*)/ /index.php?page=$1&view=$2

That is how I would do your page that you have in your coding that you gave.

There should be other ways, but thats just something simple. :)

#8 tiki

    Young Padawan

  • Members
  • Pip
  • 259 posts
  • Gender:Male
  • Location:California

Posted 15 November 2005 - 12:16 AM

THanks I got some pages working, and no more &'s :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users