FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » URL linking to 3d array
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
URL linking to 3d array [message #184254] Mon, 16 December 2013 19:15 Go to next message
Mr Oldies is currently offline  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 #184255 is a reply to message #184254] Mon, 16 December 2013 19:45 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
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.


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Re: URL linking to 3d array [message #184256 is a reply to message #184255] Mon, 16 December 2013 20:12 Go to previous messageGo to next message
Mr Oldies is currently offline  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 Go to previous messageGo to next message
Doug Miller is currently offline  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 #184258 is a reply to message #184254] Mon, 16 December 2013 20:30 Go to previous messageGo to next message
Doug Miller is currently offline  Doug Miller
Messages: 171
Registered: August 2011
Karma: 0
Senior Member
richard <noreply(at)example(dot)com> wrote in news:16w169ay7izb9$.1qkw1yyj0ql80.dlg@
40tude.net:

> $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?

RTFM.
Re: URL linking to 3d array [message #184260 is a reply to message #184254] Tue, 17 December 2013 00:42 Go to previous messageGo to next message
Denis McMahon is currently offline  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 Go to previous messageGo to next message
Christoph Michael Bec is currently offline  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 Go to previous messageGo to next message
Arno Welzel is currently offline  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 Go to previous message
Evan Platt is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to code () inside quotes
Next Topic: foreach problem
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 17:38:42 GMT 2024

Total time taken to generate the page: 0.03997 seconds