Title: Syntax error
Last modified: August 22, 2016

---

# Syntax error

 *  [ouzifeng](https://wordpress.org/support/users/ouzifeng/)
 * (@ouzifeng)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-97/)
 * would greatly appreciate some help:
 * Ok so getting white screen of death, ran debugger and got following syntax error:
 * Parse error: syntax error, unexpected ‘bfa_ata4’ (T_STRING), expecting ‘,’ or‘;’
   in D:\home\site\wwwroot\wp-content\themes\atahualpa\functions.php on line 273
 * Line 273 is as follows:
 * if (delete_option(‘bfa_ata4’)) echo ‘<span style=”color:green;font-weight:bold;”
   >Successfully deleted option ‘bfa_ata4′ …</span>’;
 * whole function is:
 * function bfa_delete_bfa_ata4() {
    check_ajax_referer( “delete_bfa_ata4” ); if(
   delete_option(‘bfa_ata4’)) echo ‘<span style=”color:green;font-weight:bold;”>
   Successfully deleted option ‘bfa_ata4′ …</span>’; else echo ‘<span style=”color:
   green;font-weight:bold;”>Something went wrong…</span>’; die(); }
 * Have deactivated all plugins but does not make a difference
 * thanks!

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

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-97/#post-5397075)
 * You’re using the single-quotes inside a string using single quoted. Thats the
   problem. Any single quotes inside the string should be escaped, as `\'`
 *  Thread Starter [ouzifeng](https://wordpress.org/support/users/ouzifeng/)
 * (@ouzifeng)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-97/#post-5397076)
 * thanks very much for your advice, I have no changed to:
 *  if (delete_option(‘bfa_ata4’)) echo ‘<span style=”color:green;font-weight:bold;”
   >Successfully deleted option “bfa_ata4” …</span>’;
 * However the letter ‘s’ is now not displaying correctly (you can see here)
 * [http://roburwordpress.azurewebsites.net/](http://roburwordpress.azurewebsites.net/)
 * is this correct?
 *  Thread Starter [ouzifeng](https://wordpress.org/support/users/ouzifeng/)
 * (@ouzifeng)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-97/#post-5397086)
 * function bfa_delete_bfa_ata4() {
    check_ajax_referer( “delete_bfa_ata4” ); if(
   delete_option(‘bfa_ata4’)) echo ‘<span style=”color:green;font-weight:bold;”>
   Successfully deleted option \’bfa_ata4\’ …</span>’; else echo ‘<span style=”color:
   green;font-weight:bold;”>Something went wrong…</span>’; die(); }
 * Now have is as \’, however getting the same syntax error
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-97/#post-5397115)
 * Then change the single quotes for double quotes.
 * It’s one thing that I should have remembered. PHP treats strings between double-
   quotes and single-quotes differently. If you use double-quotes, the text is evaluated
   and parsed, but using single quotes, it’s taken “as is”.
 *     ```
       function bfa_delete_bfa_ata4() {
           check_ajax_referer( "delete_bfa_ata4" );
           if (delete_option('bfa_ata4')) {
               echo '<span style="color:green;font-weight:bold;">Successfully deleted option "bfa_ata4" ...</span>';
           }
           else {
               echo '<span style="color:green;font-weight:bold;">Something went wrong...</span>';
           }
           die();
       }
       ```
   

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

The topic ‘Syntax error’ is closed to new replies.

## Tags

 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-97/#post-5397115)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
