URL linking to 3d array [message #184254] |
Mon, 16 December 2013 19:15 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma: 0
|
Senior Member |
|
|
$test['John Smith']['a']['b']="data";
What is the proper way to link this in the URL?
page.php?name=John Smith ???????
Are space allowed like that or not?
|
|
|
|
Re: URL linking to 3d array [message #184256 is a reply to message #184255] |
Mon, 16 December 2013 20:12 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma: 0
|
Senior Member |
|
|
On Mon, 16 Dec 2013 20:45:41 +0100, Arno Welzel wrote:
> richard, 2013-12-16 20:15:
>
>> $test['John Smith']['a']['b']="data";
>>
>> What is the proper way to link this in the URL?
>> page.php?name=John Smith ???????
>>
>> Are space allowed like that or not?
>
> Sigh.... read the documentation. It is quite easy to find out, what is
> allowed for an URL and what not.
I have.
Is the proper method to use something like page.php?John%32Smith allowed?
I would think so since that is proper for file names and such.
|
|
|
Re: URL linking to 3d array [message #184257 is a reply to message #184256] |
Mon, 16 December 2013 20:30 |
Doug Miller
Messages: 171 Registered: August 2011
Karma: 0
|
Senior Member |
|
|
richard <noreply(at)example(dot)com> wrote in news:9cotre25ot3a.ngclvn4355vk$.dlg@
40tude.net:
> On Mon, 16 Dec 2013 20:45:41 +0100, Arno Welzel wrote:
>
>> richard, 2013-12-16 20:15:
>>
>>> $test['John Smith']['a']['b']="data";
>>>
>>> What is the proper way to link this in the URL?
>>> page.php?name=John Smith ???????
>>>
>>> Are space allowed like that or not?
>>
>> Sigh.... read the documentation. It is quite easy to find out, what is
>> allowed for an URL and what not.
>
> I have.
What did it say?
> Is the proper method to use something like page.php?John%32Smith allowed?
> I would think so since that is proper for file names and such.
What have you tried? What happened when you tried it?
|
|
|
|
Re: URL linking to 3d array [message #184260 is a reply to message #184254] |
Tue, 17 December 2013 00:42 |
Denis McMahon
Messages: 634 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On Mon, 16 Dec 2013 14:15:01 -0500, richard wrote:
> $test['John Smith']['a']['b']="data";
>
> What is the proper way to link this in the URL?
> page.php?name=John Smith ???????
>
> Are space allowed like that or not?
The actual question asked has nothing to do with (a) php or (b) 3d
arrays. The question as asked is actually an html question:
"How do I encode spaces in the query part of a url?"
It can however be turned into a php question:
"Is there a php function that can automatically encode spaces in the
query part of a url?"
I would suggest you spend a significant amount of time (a) studying the
examples when you find the function and (b) comparing the different
functions that are mentioned, because if you don't (and possibly even if
you do) I know exactly what your next fuck up is going to be.
And I bet a few other people have a damn good idea too.
--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
|
|
|
Re: URL linking to 3d array [message #184261 is a reply to message #184256] |
Tue, 17 December 2013 01:04 |
Christoph Michael Bec
Messages: 207 Registered: June 2013
Karma: 0
|
Senior Member |
|
|
richard wrote:
> On Mon, 16 Dec 2013 20:45:41 +0100, Arno Welzel wrote:
>
>> richard, 2013-12-16 20:15:
>>
>>> $test['John Smith']['a']['b']="data";
>>>
>>> What is the proper way to link this in the URL?
>>> page.php?name=John Smith ???????
>>>
>>> Are space allowed like that or not?
>>
>> Sigh.... read the documentation. It is quite easy to find out, what is
>> allowed for an URL and what not.
>
> I have.
> Is the proper method to use something like page.php?John%32Smith allowed?
> I would think so since that is proper for file names and such.
You may consider to try to express yourself more precisely -- this would
help others, but above all it will help you. :)
What you're looking for in this case is the term "percent encoding"[1]
and probably the related PHP functions urlencode()[2] and rawurlencode().
[1] <http://en.wikipedia.org/wiki/Percent-encoding>
[2] <http://www.php.net/manual/en/function.urlencode.php>
--
Christoph M. Becker
|
|
|
Re: URL linking to 3d array [message #184263 is a reply to message #184256] |
Tue, 17 December 2013 07:15 |
Arno Welzel
Messages: 317 Registered: October 2011
Karma: 0
|
Senior Member |
|
|
richard, 2013-12-16 21:12:
> On Mon, 16 Dec 2013 20:45:41 +0100, Arno Welzel wrote:
>
>> richard, 2013-12-16 20:15:
>>
>>> $test['John Smith']['a']['b']="data";
>>>
>>> What is the proper way to link this in the URL?
>>> page.php?name=John Smith ???????
>>>
>>> Are space allowed like that or not?
>>
>> Sigh.... read the documentation. It is quite easy to find out, what is
>> allowed for an URL and what not.
>
> I have.
Then why do you ask?
> Is the proper method to use something like page.php?John%32Smith allowed?
Yes - but %32 is not "space".
Also see <http://www.php.net/manual/en/function.urlencode.php>
--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
|
|
|
Re: URL linking to 3d array [message #184264 is a reply to message #184263] |
Tue, 17 December 2013 16:51 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Tue, 17 Dec 2013 08:15:30 +0100, Arno Welzel <usenet(at)arnowelzel(dot)de>
wrote:
> Yes - but %32 is not "space".
Shh! I was waiting to see how long it would take him to figure that
one out himself.
My guess was sometime after the completion of his dome home.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|