Echo an $_POST in PHP
问题 How can I print a $_POST ? Example: echo $_POST['data']; This returns nothing... 回答1: You can also wrap your code with <pre> tags to make your array prints out nicer instead of just 1 continuous line. A trick that was shown by a member on this site. <pre> <?php var_dump($_POST); ?> </pre> 回答2: Your code is correct. You can use either: var_dump($_POST); or print_r($_POST); to print out the entire POST array for debugging. 回答3: You can only show the values of keys that exist. array_keys()