heldenbrau Posted August 10, 2009 Share Posted August 10, 2009 This is on the first line of php in a webpage, which is line 30 <?php $case = $_GET[case]; It is to pick up the value 76 from another page <a href="agree.php?case=76> I keep getting the following error. But I use the same code in another program and it is fine with that. Parse error: syntax error, unexpected T_CASE, expecting ']' Quote Link to comment https://forums.phpfreaks.com/topic/169665-why-does-this-give-me-an-error/ Share on other sites More sharing options...
Daniel0 Posted August 10, 2009 Share Posted August 10, 2009 http://php.net/types.array Read that and then throw out your book or find a newer tutorial if that's what you're using. Quote Link to comment https://forums.phpfreaks.com/topic/169665-why-does-this-give-me-an-error/#findComment-895072 Share on other sites More sharing options...
Maq Posted August 10, 2009 Share Posted August 10, 2009 You need single quotes around your associative array key. Quote Link to comment https://forums.phpfreaks.com/topic/169665-why-does-this-give-me-an-error/#findComment-895073 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.