Post your trick

php array to http url

hi guys,

I came across a beautiful function of php which will convert any php array to the GET parameter for url.

E.g.

$data = array( ‘foo’ => ‘bar’, ‘jimy’ => ‘modi’ );

$url = http_build_query($data);

this will give you

foo=bar&jimy=modi

More info


Leave a Reply

     

     

     

Post A Trick !

How does "Kodetricks" work?

We at kodeplay like to share knowledge. With Kodetricks, even you can join us. All you need to do is post a programming related trick if you have one or rate a trick if you like someone else's.



Technology

Contact Us