Title: Parse error: syntax error, unexpected &#039;if&#039; (T_IF)
Last modified: August 31, 2016

---

# Parse error: syntax error, unexpected 'if' (T_IF)

 *  [mrwrongusername](https://wordpress.org/support/users/mrwrongusername/)
 * (@mrwrongusername)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-if-t_if-2/)
 * Hi,
 * I am getting this error but I don’t see where the issue is.
 * Can you?
 *     ```
       <?php
       /**
       * @Start notification helper class
       * @return
       */
   
       if( !class_exists( 'CS_Notification_Helper' ) ) {
       	class CS_Notification_Helper{
   
       		public $message;
   
       		public function __construct() {
       			// Do Something here..
       		}
   
       		public function success( $message = 'No recored found' ) {
       			global $post;
   
       			$output	 = '';
       			$output	.= '<div class="col-md-12 cs-succ_mess"><p>';
       			$output	.= $message;
       			$output	.= '</p></div>';
   
       			echo force_balance_tags ( $output );
       		}
   
       		public function error( $message='No recored found' ) {
       			global $post;
   
       		   $output	 = '';
       		   $output	.= '<div class="col-md-12 cs-error"><p>';
       		   $output	.= $message;
       		   $output	.= '</p></div>';
   
       		   echo force_balance_tags ( $output ); 	
   
       		}
   
       		public function warning( $message='No recored found' ) {
       		  global $post;	
   
       		  $output	 = '';
       		  $output	.= '<div class="col-md-12 cs-warning"><p>';
       		  $output	.= $message;
       		  $output	.= '</p></div>';
   
       		 echo force_balance_tags ( $output );
       		}
   
       		public function informations($message='No recored found') {
       		  global $post;
   
       		  $output	 = '';
       		  $output	.= '<div class="col-md-12 cs-informations"><p>';
       		  $output	.= $message;
       		  $output	.= '</p></div>';
   
       		 echo force_balance_tags ( $output ); 
   
       		}
       	}
       }
   
       $cs_notification = new CS_Notification_Helper();
       global $cs_notification;
       ?>
       ```
   
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-if-t_if-2/#post-7190955)
 * Is there no space between “if” and “(“? Try adding one.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-if-t_if-2/#post-7190975)
 * There’s nothing in that code that’s wrong. I’d guess that it’s going to have 
   more to do with how you’re including that file in the site. What are you uisng
   to call that file? Something like `include()`, or `require()`?
 *  Thread Starter [mrwrongusername](https://wordpress.org/support/users/mrwrongusername/)
 * (@mrwrongusername)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-if-t_if-2/#post-7191022)
 * I really don’t know because this is all new for me.
    I will have to contact theme
   support for this issue.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Parse error: syntax error, unexpected 'if' (T_IF)’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [mrwrongusername](https://wordpress.org/support/users/mrwrongusername/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-if-t_if-2/#post-7191022)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
