hitokirikensan Posted January 22, 2011 Share Posted January 22, 2011 I'm a complete newb at programming so please bear with me i'm trying to check to make sure my sql query $result=mysql_query("SELECT screenname FROM users WHERE privacy='0'"); shows the correct results so i did a print_r($result); die(); but when i reload the page, it shows a syntax error after the die(); isn't the script suppose to completely stop so syntax errors after die() shouldn't matter? also i'm expecting the $result to be an array of names and i wanted to do a query to another table to grab comments from each of those screennames, is the only way to do a for loop of mysql queries? Thanks Link to comment https://forums.phpfreaks.com/topic/225287-php-die-doesnt-end-script/ Share on other sites More sharing options...
requinix Posted January 22, 2011 Share Posted January 22, 2011 Already solved? Meh. PHP has to parse the file before it can execute it. If doesn't know that the script can't possibly get passed a certain point. All it cares about, at that moment, is whether the file has proper syntax. If not, it will complain. __halt_compiler() is an exception to the rule. Link to comment https://forums.phpfreaks.com/topic/225287-php-die-doesnt-end-script/#findComment-1163471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.