edg322 Posted October 19, 2006 Share Posted October 19, 2006 Which one is better for debugging values? For example $_SESSION and $_REQUEST values. Quote Link to comment https://forums.phpfreaks.com/topic/24476-debug-or-print_r/ Share on other sites More sharing options...
Ninjakreborn Posted October 19, 2006 Share Posted October 19, 2006 Debugging is an art, you ask a wierd question.It depends on which variable you are trying to debug, and what's wrong with it.If it's a session and you want to see if it's setif (isset($_SESSION['variable'])) {echo "it's set";}else {echo "it's not set";}then again if you are wanting to test the session to see what's in itecho $_SESSION['variable']if you were wanting to test a post or get variable same way, just with post or get.THen agian it might be something coming in, or something overwriting the variable, so then you have to find out what's causing that.Sometimes it might not even reveal anything there are multiple techniques to debugging, be a little more specific. Quote Link to comment https://forums.phpfreaks.com/topic/24476-debug-or-print_r/#findComment-111510 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.