Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

How To pass an Array in the Querystring Using PHP

Olivia Rhye

I recently ran across a silly WordPress situation where I needed to pass an array in the querystring. Here's what I came up with:


$array = array('a' => 1, 'b' => 2, 'c' => 3);
$array = rawurlencode(serialize($array));
echo '
Pass array';

Then on the receiving getarray.php:


$array = unserialize(stripslashes($_GET['error_array']));

Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy