Tags
PHP
Asked 7 years ago
29 Nov 2016
Views 1841
jaggy

jaggy posted

PHP Parse error: syntax error, unexpected 'else' (T_ELSE) in

PHP Parse error: syntax error, unexpected 'else' (T_ELSE) in

what should be problem in this error . sorry i am learner at php
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

it simple error arise with mostly if and else statement ,
ideally if .. else .. should be like

if( ..condition.. ){
//some code here
}
else {
// some code here 
}

if you forget any parenthesis it can cause problem "PHP Parse error: syntax error, unexpected 'else' (T_ELSE) in" .

so pls check at line no of error you got solution . still did not get problem write down the code at here i will suggest pin point solution .
Post Answer