0

i'm wondering why this condition dosn't work

if(!empty($b['boxText1']) || !empty($b['boxText2']) || !empty($b['boxText3']))) {
 // do something
}

i get this error:

Parse error: syntax error, unexpected '!' in

am i missing something?

best

hakre
  • 193,403
  • 52
  • 435
  • 836
Neugi
  • 29
  • 6
  • You are probably missing to take a look here first: [Reference - What does this error mean in PHP?](http://stackoverflow.com/q/12769982/367456) ;) – hakre Feb 20 '13 at 10:05

3 Answers3

2

Try this..........you typed extra ')'.....

if(!empty($b['boxText1']) || !empty($b['boxText2']) || !empty($b['boxText3'])) {
 // do something
}
Venkata Krishna
  • 4,287
  • 6
  • 30
  • 53
1
if(!empty($b['boxText1']) || !empty($b['boxText2']) || !empty($b['boxText3']) ) ) {
                                                                                ^

Remove the extra bracket you have used.

Rikesh
  • 26,156
  • 14
  • 79
  • 87
0
if(!empty($b['boxText1']) || !empty($b['boxText2']) || !empty($b['boxText3'])) {
 // do something
}
Prasanth Bendra
  • 31,145
  • 9
  • 53
  • 73