0
<?php 
  $this->widget('bootstrap.widgets.TbAlert', array(
      'block'=>true, // display a larger alert block?
      'fade'=>true, // use transitions?
      'closeText'=>'&times;', // close link text - if set to false, no close link is displayed
      'alerts'=>array( // configurations per alert type
        'success'=>array(
          'block'=>true,
          'fade'=>true,
          'closeText'=>'&times;',
        ), // success, info, warning, error or danger
      ),
    ),
  );
?>

PHP Parse error: syntax error, unexpected ')' in /dev/shm/untitled.php on line 14

I really can't find the error and watched it like 100 times. Need to implement this widget, thanks!

There are 4 opening parenthesis and 4 closing. Commas are ok, so... ?

2 Answers 2

1
<?php 
  $this->widget('bootstrap.widgets.TbAlert', array(
      'block'=>true,
      'fade'=>true,
      'closeText'=>'&times;',
      'alerts'=>array( 
        'success'=>array(
          'block'=>true,
          'fade'=>true,
          'closeText'=>'&times;'
        ),
      ),
    ), // you have comma here - it's mistake
  );
?>
Sign up to request clarification or add additional context in comments.

2 Comments

Hmmmm sure, I don't know why I thought it was inside an array
NetBeans IDE 7.2.1 (Build 201210100934)
0

see instruction

Requires

php: >=5.4.0

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.