phpSensei Posted August 22, 2007 Share Posted August 22, 2007 This Seemed to work awhile ago but now it just shows up an error: Parse error: syntax error, unexpected ')' in C:\wamp\www\forum_software\index.php on line 68 code: if($_GET['forum'] != (int) ){ die(page_error()); } I want to check if the "forum" variable that was passed from the URL is an interger or not... Quote Link to comment https://forums.phpfreaks.com/topic/66200-solved-string-types/ Share on other sites More sharing options...
Barand Posted August 22, 2007 Share Posted August 22, 2007 The syntax (int) is used to cast a variable as int. try if (!is_numeric($_GET['forum'])) Quote Link to comment https://forums.phpfreaks.com/topic/66200-solved-string-types/#findComment-331143 Share on other sites More sharing options...
phpSensei Posted August 22, 2007 Author Share Posted August 22, 2007 thanks, topic solved. Quote Link to comment https://forums.phpfreaks.com/topic/66200-solved-string-types/#findComment-331231 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.