Take the ' out of $_GET['id'] if you are going to have it within a string defined by '
Echo 'hello $_GET['id'] world'; How is PHP supposed to know that the two internal ' are not supposed to be the end of the string?? (FYI: Variables are not parsed within strings defined by ') Echo 'hello ' . $_GET['id'] . ' world'; Or... Echo "hello $_GET[id] world"; Etc...adapt to your needs... ---John Holmes... > -----Original Message----- > From: X-power.be [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 10, 2002 8:04 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] URL / slash reduction > > the nickname 'junni' was an example.. > > i have this now but its not working :( > > <?php > $url = > str_replace('?id=/','?id=','http://www.tuned- > belgium.com/user/?id=/$_GET['id > ']'); > ?> > <head><META HTTP-EQUIV="Refresh" CONTENT="0; > URL=http://tuned- > belgium.com/main/modules.php?name=user&op=userinfo&uname=<? > print $url ?>"></head> > > gives: > > Parse error: parse error in /usr/home/v1/a0016905/html/user/filter.php on > line 2 > > > the meaning of it is that http://user.tuned-belgium.be/nickname > goes to > http://tuned- > belgium.com/main/modules.php?name=user&op=userinfo&uname=nickna > me > > > ------- ------- ------- ------- ------- ------- > Connecting Tuners @ http://www.Tuned-Belgium.com > Xbox talk @ http://www.X-power.be > Gamecube @ http://www.cube-power.be > > "Dave" <[EMAIL PROTECTED]> schreef in bericht > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > >this url is the one that i want for my users: > > > > > >http://user.tuned-belgium.be/junni > > > > > > > > >but go's now to > > > > > >http://www.tuned-belgium.com/user/?id=/junni (slash junni) > > > > > >but must go to > > > > > >http://www.tuned-belgium.com/user/?id=junni (without slash) > > > > > >how can i prevent or filter the slash away? > > > > without getting eloquent... and assuming your url string is static each > time > > ($id doesn't move withing your url string). > > > > $url = > > > str_replace('?id=/','?id=','http://www.tuned- > belgium.com/user/?id=/junni'); > > > > Dave > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php