Re: Re: calling PHP self with a text link
| From: | Mark Rees | Date: | Fri, 02 Sep 2005 09:27:29 +0000 |
| Subject: | Re: Re: calling PHP self with a text link | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221745@lists.php.net to get a copy of this message | ||
> Ross wrote:
> > <a href="<? echo $PHP_SELF,'?','&action=something'
> > ?>">do somehthing</a>
> >
> > this seems to work but can someone explain the syntax to me what does a
'?'
> > and a ',' do in PHP?
> >
> > I thought you joined strings with a full stop '.' (a period if you are
from
> > the US).
>
There was a long thread on this only yesterday, under the heading "String
format problem". The online archives will carry it shortly, if they don't
already, and it is well worth a read, especially the post by Satyam
> You are passing multiple parameters to the 'echo' language construct.
> The '?' is just a string, and is interpreted just like any other string
> in PHP. That will print out the value of $PHP_SELF followed by
> ?&action=something
>
> By the way, you really shouldn't have register_globals turned on. And
> you also really shouldn't top-post.
>
> --
> Jasper Bryant-Greene
> Freelance web developer
> http://jasper.bryant-greene.name/
>
> If you find my advice useful, please consider donating to a poor
> student! You can choose whatever amount you think my advice was
> worth to you. http://tinyurl.com/7oa5s