开发者

PHP Error, syntax error T_STRING! [closed]

开发者 https://www.devze.com 2023-01-05 22:24 出处:网络
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.

This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.

Closed 8 years ago.

Improve this question

I get the following error;

开发者_StackOverflow
Parse error: syntax error, unexpected T_STRING in D:\XAMPP\xampp\htdocs\site\register.php on line 95

Line 95 is;

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6))

Please help, I don't know what's wrong :/ It all looks fine to me.

Thanks In Advance!


You forgot an operator before your strlen() call. Also, you have an extra ) at the end.


The syntax error occurs at this position:

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6))
                                               ^

Furthermore you have one closing parenthesis but no corresponding opening parenthesis:

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6))
                                                                  ^

What you probably meant:

if (strstr($email, "@") && strstr($email, ".") && strlen($email) >= 6)

Or:

if (strstr($email, "@") && strstr($email, ".") && (strlen($email) >= 6))
0

精彩评论

暂无评论...
验证码 换一张
取 消