xcoderx Posted August 14, 2009 Share Posted August 14, 2009 Parse error: syntax error, unexpected T_PRIVATE in /home/public_html/index.php on line 346 any idea?? Quote Link to comment https://forums.phpfreaks.com/topic/170234-solved-what-error-is-this/ Share on other sites More sharing options...
oni-kun Posted August 14, 2009 Share Posted August 14, 2009 Showing us line 346 would be helpful you know... Quote Link to comment https://forums.phpfreaks.com/topic/170234-solved-what-error-is-this/#findComment-897991 Share on other sites More sharing options...
xcoderx Posted August 14, 2009 Author Share Posted August 14, 2009 here echo private($nick,$pass,$page); Quote Link to comment https://forums.phpfreaks.com/topic/170234-solved-what-error-is-this/#findComment-897996 Share on other sites More sharing options...
Mark Baker Posted August 14, 2009 Share Posted August 14, 2009 private is a PHP key word Quote Link to comment https://forums.phpfreaks.com/topic/170234-solved-what-error-is-this/#findComment-897997 Share on other sites More sharing options...
oni-kun Posted August 14, 2009 Share Posted August 14, 2009 Yeah, You can't use it as a function.. private $one, $two, $three Meaning you cannot use private as a function name, you'll have to change it. Quote Link to comment https://forums.phpfreaks.com/topic/170234-solved-what-error-is-this/#findComment-897999 Share on other sites More sharing options...
aschk Posted August 14, 2009 Share Posted August 14, 2009 Indeed... You can't have function names the same as PHP keywords. This also applies to "public", "protected", "count", "foreach"... etc. So rename your function to myprivate() or xprivate() or something other than just private() Quote Link to comment https://forums.phpfreaks.com/topic/170234-solved-what-error-is-this/#findComment-898001 Share on other sites More sharing options...
xcoderx Posted August 14, 2009 Author Share Posted August 14, 2009 walla very true its fixed thanks soo much Quote Link to comment https://forums.phpfreaks.com/topic/170234-solved-what-error-is-this/#findComment-898004 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.