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
  • 184,866
  • 48
  • 414
  • 792
Neugi
  • 19
  • 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,209
  • 5
  • 29
  • 53
1
if(!empty($b['boxText1']) || !empty($b['boxText2']) || !empty($b['boxText3']) ) ) {
                                                                                ^

Remove the extra bracket you have used.

Rikesh
  • 25,621
  • 14
  • 77
  • 86
0
if(!empty($b['boxText1']) || !empty($b['boxText2']) || !empty($b['boxText3'])) {
 // do something
}
Prasanth Bendra
  • 29,105
  • 8
  • 50
  • 70