Title: syntax error, unexpected &#8221; ); ?&gt;&#8221;&gt; &#8216; (T_CONSTANT_ENCAPSED_STRING)
Last modified: August 11, 2021

---

# syntax error, unexpected ” ); ?>”> ‘ (T_CONSTANT_ENCAPSED_STRING)

 *  [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/)
 * (@rizwanramzan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/)
 * i going to develop plugin and i want to access the file the file path is C:\wamp64\
   www\wordpress\wp-content\plugins\myplugin\applicant_functions
    and the path of
   file in which this file access is in same folder when i click on active plugin
   button it sent an error like this **Parse error: syntax error, unexpected ” );?
   >”> ‘ (T_CONSTANT_ENCAPSED_STRING) in C:\wamp64\www\wordpress\wp-content\plugins\
   myplugin\applicant_functions\functions.php on line 48**
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsyntax-error-unexpected-t_constant_encapsed_string-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14758033)
 * So what are lines 40-50 of that file?
 *  Thread Starter [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/)
 * (@rizwanramzan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14759501)
 *     ```
       function aasaan_applicant()
       {
         $content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;">
           <a>"></a>
           </div>';
   
       	return $content; 
       }
       add_shortcode('aasaan_applicant','aasaan_applicant');
       ```
   
    -  This reply was modified 4 years, 10 months ago by [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/).
    -  This reply was modified 4 years, 10 months ago by [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/).
    -  This reply was modified 4 years, 10 months ago by [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/).
    -  This reply was modified 4 years, 10 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/)
 * (@rizwanramzan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14759518)
 *     ```
       * Applicant ID=  */
       function aasaan_applicant()
       {
       	$content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;">
           <a href="<?php echo get_theme_file_uri( '/register/applicant_functions/registration.php' ); ?>"></a>
           </div>';
   
       	return $content; 
       }
       add_shortcode('aasaan_applicant','aasaan_applicant');
        //this is the code of that error
       ```
   
    -  This reply was modified 4 years, 10 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14759581)
 * You’re dropping a `<?php` construct into a string. Break it up and use the string
   append operator to put things together.
 * Something like
 *     ```
       $content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="'
          . <?php echo get_theme_file_uri('/register/applicant_functions/registration.php' ); ?> . 
           '"></a></div>';
       ```
   
    -  This reply was modified 4 years, 10 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/)
 * (@rizwanramzan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14759932)
 * Parse error: syntax error, unexpected ‘<‘ in C:\wamp64\www\wordpress\wp-content\
   plugins\myplugin\applicant_functions\functions.php on line 47
 * again send an error
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14761469)
 * What’s line 47?
 *  Thread Starter [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/)
 * (@rizwanramzan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14761836)
 *     ```
       function aasaan_applicant()
       {
       	/* $content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="'.<?php echo get_theme_file_uri('/applicant_functions/registration.php' ); ?> .'"></a></div>';
   
       	return $content; 
   
       }
       add_shortcode('aasaan_applicant','aasaan_applicant');
       ```
   
 * sir I am going to develop a plugin and me directory path is this
    C:\wamp64\www\
   wordpress\wp-content\plugins\myplugin\applicant_functions **my files are** auth_session.
   php login.php db.php registration.php logout.php start.php dasboard.php
 * now i want to access my registration.php file in start.php file kindly tell me
   how i can access the above code show me the error
 *  Thread Starter [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/)
 * (@rizwanramzan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14761880)
 *     ```
       function aasaan_applicant()
       {
       	<strong>the below line is 47</strong>
        $content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="'.<?php echo get_theme_file_uri('/applicant_functions/registration.php' ); ?> .'"></a></div>';
   
       	return $content; 
   
       }
       add_shortcode('aasaan_applicant','aasaan_applicant');
       ```
   
    -  This reply was modified 4 years, 10 months ago by [rizwanramzan](https://wordpress.org/support/users/rizwanramzan/).
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14761887)
 * I think you need to read the [developer documentation](https://developer.wordpress.org/plugins/).
 *     ```
       $content = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 736px;"><a href="';
       #content .= get_theme_file_uri('/applicant_functions/registration.php' );
       $content .= '"></a></div>';
       ```
   
 * Note that you should not use echo statements inside a shortcode.

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

The topic ‘syntax error, unexpected ” ); ?>”> ‘ (T_CONSTANT_ENCAPSED_STRING)’ 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/)
 * 9 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_constant_encapsed_string-2/#post-14761887)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
