Jump to content

[SOLVED] advanced $_GET[] question


Derleek

Recommended Posts

hello php freaks!

 

Not sure what else to title this topic so... that one will do

 

I am creating an ajax application and i'm wondering the best way to loop through every variable passed via the $_GET[] method.

 

Lets say I have 4 var's that I'm passing in the URL www.example.com/index.php?var1=blah&var2=asdfasdf&pumpkin=true.

 

Is there a built in function to loop through every var passed this way?

 

The only solution I have thought of off the top of my head is to have a variable that contains each of the names that also has a parsing character

 

EX: www.example.com/index.php?varsPassed=var1/var2/pumpkin&var1=blah...etc

 

I haven't tested this method so I am not sure even if the '/' character can be passed as a parsing character.

 

This is my first in-depth ajax application so I'm kinda experimenting with it.  Not too sure if even using the 'GET' method is the best option (or even if there are other viable options... haha).

 

I'll be tooling around with this for the next hour or so and i'll post any new angles I dig up on the net.

 

Any and all help is welcome and greatly appreciated.

 

-thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.