thangappan Posted February 2, 2009 Share Posted February 2, 2009 See the following files. File: testing.php $table_name = 'project.contact_detail'; $attributes = array( "First Name" => "first_name", "Last Name" => "last_name","Email" => "email", "Phone" => "phone","Fax" => "fax","Comment" => "comment","Topic" => "CONTACT DETAILS"); $string=http_build_query(array('attr'=>$attributes,'table' =>$table_name)); print_r($attributes); // It prints correctly. echo "<script language=\"javascript\"> window.location = \"Pagination.php?Value=$string\";</script>\n"; File2: Pagination.php if($_GET['Value']){ print_r($_GET['attr']); } It prints following result. "Last Name" => "last_name","Email" => "email", "Phone" => "phone","Fax" => "fax","Comment" => "comment","Topic" => "CONTACT DETAILS"); Why the first value will be skipped? Link to comment https://forums.phpfreaks.com/topic/143435-loading-an-array-into-another-page/ Share on other sites More sharing options...
Snart Posted February 2, 2009 Share Posted February 2, 2009 Because the first value is attributed to "Value" due to the "Value=" in your URL. Try with echo "<script language=\"javascript\"> window.location = \"Pagination.php?$string\";</script>\n"; Link to comment https://forums.phpfreaks.com/topic/143435-loading-an-array-into-another-page/#findComment-752429 Share on other sites More sharing options...
thangappan Posted February 2, 2009 Author Share Posted February 2, 2009 Ok it is working fine.Thanks for your information. Link to comment https://forums.phpfreaks.com/topic/143435-loading-an-array-into-another-page/#findComment-752479 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.