Parse error, unexpected T_BOOLEAN_AND(&&)!

Discussion in 'PHP' started by talker1, Apr 11, 2011.

  1. #1
    Hi

    I have error on this line

    $counter = ( int ) && 0 < $reccatcnt['arr'] ? "(".$reccatcnt['arr'].")" : "";

    How i can fix it?

    Thank you.
     
    talker1, Apr 11, 2011 IP
  2. leunamer

    leunamer Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $counter = ( int ) && 0 < $reccatcnt['arr'] ? "(".$reccatcnt['arr'].")" : "";

    Something missing in (int) of what, are you trying to type-cast a string like for example (int)N or you can remove the (int) && if its not necessary as

    $counter = 0 < $reccatcnt['arr'] ? "(".$reccatcnt['arr'].")" : "";
     
    leunamer, Apr 11, 2011 IP