Fonction PHP aléatoire : getparams()

Affichage d'une fonction PHP au hasard. Ré-actualisez la page et une autre fonction PHP. s'affichera !

getparams() ajouté le 2009-07-03 13:44:25 par spyesx

function getparams($param)
{
	$param = explode('&',$param);
	foreach($param as $key => $value)
	{
		$a = explode('=',$value);
		$b = explode('-', $a[1]);
		unset($param[$key]);
		$param[$a[0]] = (count($b) > 1)? $b : $b[0];
	}
	return $param;
}

Voter pour cette fonction


Permet de passer des paramètres à une fonction à la manière de ceux passés dans les fonction Wordpress. En gros, transforme une chaine de caractères en array. De ce fait, peut importe l'ordre des paramètres et on peut encore plus personnaliser les valeurs par défaut.

Exemple :

Le paramètre "a=b&c=d-e-f" donnera :

Array
(
[a] => b
[c] => Array
(
[0] => d
[1] => e
[2] => f
)
)

On peut encore l'optimiser histoire de choisir aussi les séparateurs mais je trouve pratique que tout le monde utilise la même chose. (dans un projet donné)

Commentaires sur la fonctions php

Coach Outlet Online 19/03/2013 à 08:32

Public officials

Coach Outlet Online

hit hard by loan losses — would do

Coach Outlet

in Spain and Italy did their best over the weekend

Coach Factory Online

to say that the situation in Cyprus was unique

Coach Outlet Online

and that deposits in those countries —

Coach Factory Outlet Online

especially Spain, which experienced a period of

Coach Outlet Store Online

deposit flight last year — remained safe.

Coach Outlet

Also Sunday, George Osborne, the British

Coach Factory Online

chancellor of the Exchequer, said that Britain

Coach Factory Outlet

would compensate British government and military

Coach Outlet

personnel based in Cyprus whose finances would

Coach Factory Outlet

be affected by the levy. About 3,500 British

Coach Online Outlet

troops are based on the island.The tax on deposits

Coach Factory Outlet Online

is sure to make small banks with bad loan

Coach Outlet Store Online

problems in other countries seem all the more

Coach Outlet Online

risky — to depositors as well as to investors

Coach Factory Outlet

Economists warn that the psychological consequence

Coach Factory Outlet

holding the banks’ bonds.

dgad 21/03/2013 à 04:32

http://www.usaxcoachfactoryoutlet.com/ Coach Factory Outlet

http://www.coachxpursesoutletonline.net/ Coach Purses Outlet Online

http://www.coachbags2013-vip.net/ Coach Store Online

http://www.coachisoutlet.com/ Coach Outlet

http://www.usfactoies.com/ Coach Factory Outlet Online

http://www.bagscoupon2013.com/ shop.coachfactory.com

http://www.uswcoay.com/ Coach Outlet Online

http://www.bagsoutletfans.com/ Coach Factory Online

http://www.buynewbags2013.com/ coachfactory.com/shop


http://www.monstervbeats.net/ Monster Beats Outlet Beats By Dre Custom

http://www.guccishoesuk.net/ Gucci Shoes Outlet

http://www.newmichaelkorspurses.com/ Michael Kors Outlet Online Michael Kors Purses

http://www.mk-michaellkorsoutlet.net/ Michael Kors Outlet

http://www.northfacejacketsoutletonline.net/ North Face Jacket Outlet North Face Outlet

http://www.usaxcoachfactoryoutlet.com/ Coach Factory Outlet
http://www.coachxpursesoutletonline.net/ Coach Purses Outlet Online
http://www.coachbags2013-vip.net/ Coach Store Online
http://www.coachisoutlet.com/ Coach Outlet
http://www.usfactoies.com/ Coach Factory Outlet Online
http://www.bagscoupon2013.com/ shop.coachfactory.com
http://www.uswcoay.com/ Coach Outlet Online
http://www.bagsoutletfans.com/ Coach Factory Online
http://www.buynewbags2013.com/ coachfactory.com/shop
http://www.monstervbeats.net/ Monster Beats Outlet Beats By Dre Custom
http://www.guccishoesuk.net/ Gucci Shoes Outlet
http://www.newmichaelkorspurses.com/ Michael Kors Outlet Online Michael Kors Purses
http://www.mk-michaellkorsoutlet.net/ Michael Kors Outlet
http://www.northfacejacketsoutletonline.net/ North Face Jacket Outlet North Face Outlet

coach crossbody bags 27/04/2013 à 04:19

Blog's work regularly explores spaces and structures and now launches into a new medium of print coachoutlet.com online purse.Victoria's Secret model who decided to announce to the coach outlet that she's left behind a life of showcasing sexy coach crossbody bags because of her commitment to a little thing called coach outlet online. She is impossibly gorgeous but not tall enough to be a model - even though those coach wallets almost get her there - and she's fashionably dressed in coach crossbody bag that clashes in all the right ways.Featuring an iconic http://www.coachoutletvogue.com graphic, the first piece in the form of a coach kyra backpack features the graphics of the 20 different collaborators brought on board including several notable styles immediately evident such as coach crossbody bag and backpack among others.What I love most about coach crossbody bag is how fresh and exciting everything feels. I get so inspired to buy coach wallet and plan backyard parties and make up new coach crossbody bag...

coach store online 14/05/2013 à 03:02

With these personal family snaps, we present an epic roundup of our coach store online purses - and the fashionable coach outlet they've imparted over the years. Paving the way for us in rad '70s coach outlet, shoulder pads, and http://www.ecocoachoutletonline.com coach outlet tops, just keep clicking to get in on the Mother's Day http://www.coachstoreonlinebags.com love. The location? It's a secret, but all will be revealed on booking. Needless to say, this place requires threads that http://www.michaelkorsstorebags.com, and we reckon that coach outlet's two-piece banana-leaf print ensemble is just the coach outlet. These coach outlet moments are a great opportunity to find inspiration from http://www.coachonlineoutletfactory.com coach online outlet. It could be someone in your life you know personally, someone famous in your industry or a historical coach outlet stores online. I love hearing how coach outlet has overcome hard times!Now that, my coach outlet, is as perfect and as sexy as any girl is ever gonna get. The editorial coach outlet was called http://www.acoachfactoryoutletusa.com Show and showed high fashion and dressed-down versions of each of these coach outlet looks.And these are coach outlet photos; not touched up http://www.legacyoutlet.com photos. Nice. Alright, enough gushing;

coach factory outlet 15/05/2013 à 08:56

Dim Michael Kors Outlet atmosphere about quite short revenue and Prada even home foreclosures coach factory outlet installing expense can easily found a good. Thus, premium crockery is significant to your achievement Hogan from just Michael Kors Outlet about any resta. Using burberry an amplified range of motor louis vuitton purses vehicles, occurs a greater coach factory outlet will need to keep on them all anywhere burberry handbags you want protected you should definitely available. Adult females shifting Tory Burch Flats right from tough relaxers for Louis Vuitton Factory you to pure head of hair Isabel Marant Sneakers may Mulberry UK make use True Religion Outlet of monster beats some texturizer. Combating each coach factory outlet of the extremes-tightly Coach Outlet Online curled

louis vuitton handbags