jasonc Posted June 18, 2006 Share Posted June 18, 2006 i wish to get all details used in the $_GET statementsi tried this but not sure why it will not work, is this the correct way of have i not got this righti get an error saying that i have a double arrow ?please advisethank you$postdetails = "";foreach ($data = $key => $_GET) {$postdetails .= '.'.$key.'. '.$data[$key].'.\n';} Link to comment https://forums.phpfreaks.com/topic/12287-getting-all-info-from-_post-using-while/ Share on other sites More sharing options...
.josh Posted June 18, 2006 Share Posted June 18, 2006 is it post or get? your title says POST but you are talking about GET in your question. i guess it doesn't matter. it would be like this:[code]$postdetails = "";// use $_POST instead of $_GET if you want to do POST varsforeach($_GET as $key => $val) { $postdetails .= $key . " " . $val . "\n"; //or however you wish to format it}[/code] Link to comment https://forums.phpfreaks.com/topic/12287-getting-all-info-from-_post-using-while/#findComment-46937 Share on other sites More sharing options...
poirot Posted June 18, 2006 Share Posted June 18, 2006 You may want to check print_r() as well:[a href=\"http://www.php.net/print_r\" target=\"_blank\"]http://www.php.net/print_r[/a] Link to comment https://forums.phpfreaks.com/topic/12287-getting-all-info-from-_post-using-while/#findComment-46969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.