Title: Conditional code gives parse error
Last modified: August 21, 2016

---

# Conditional code gives parse error

 *  Resolved [indira14](https://wordpress.org/support/users/indira14/)
 * (@indira14)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/conditional-code-gives-parse-error/)
 * **Parse error: syntax error, unexpected ‘endif’ (T_ENDIF) in /home/toko4a1q/public_html/
   wp-content/plugins/php-code-widget/execphp.php(27) : eval()’d code on line 7**
 * I am getting this error when trying to use a conditional code:
 *  <?php
    if(ICL_LANGUAGE_CODE==’en’); ?> Sign up for our newsletter to receive
   news on new products, events and more.’
 * <?php echo do_shortcode(‘[newsletter_form]’); ?>
 * <?php endif; ?>
 * <?php if(ICL_LANGUAGE_CODE==’ne’); ?>
    Meld u hier aan voor nieuwsbrieven met
   nieuwe producten, evenementen en meer.
 * <?php echo do_shortcode(‘[newsletter_form]’); ?>
 * <?php endif; ?>
 * What am I doing wrong?
 * [https://wordpress.org/plugins/php-code-widget/](https://wordpress.org/plugins/php-code-widget/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [12 years, 2 months ago](https://wordpress.org/support/topic/conditional-code-gives-parse-error/#post-4732917)
 * You have an incorrect semi-colon after your if statements. That should be a colon
   instead.
 * This forum is not intended for general PHP advice and help. Please look elsewhere
   for general PHP errors and solutions.

Viewing 1 replies (of 1 total)

The topic ‘Conditional code gives parse error’ is closed to new replies.

 * ![](https://ps.w.org/php-code-widget/assets/icon.svg?rev=992095)
 * [PHP Code Widget](https://wordpress.org/plugins/php-code-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-code-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-code-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/php-code-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-code-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-code-widget/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/conditional-code-gives-parse-error/#post-4732917)
 * Status: resolved