Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   [PHP] Multi-D Super Global Array? (https://thetfp.com/tfp/tilted-technology/107420-php-multi-d-super-global-array.html)

xepherys 08-11-2006 04:13 PM

[PHP] Multi-D Super Global Array?
 
Is the super global array allowed to take multiple dimensions? Currently, I have:

Code:

$_SESSION[$self]['sort']
as a sort, but several pages use the same fields for sorting, and it can get messy if you are using more than one page. I'd like to do something like:

Code:

$_SESSION[$self]['$thispage']['sort']
but if it's not going to work, it's a lot of hassle just to try. I thought I'd see if any of you knew off the tops of your heads? Thanks!

captobvious 08-12-2006 01:17 AM

Yes, you can use multidimensional arrays for superglobals in PHP. The only catch I know of is that you can't use a numeric index, so just make sure that $self isn't a number.


All times are GMT -8. The time now is 03:36 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43