Title: Parse error: syntax error, unexpected T_STRING
Last modified: August 21, 2016

---

# Parse error: syntax error, unexpected T_STRING

 *  [Anouk](https://wordpress.org/support/users/anouk0693/)
 * (@anouk0693)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-56/)
 * I get an error on line 74 and I have searched a lot, but I can’t find a solution.
   As far as I can see I haven’t missed some ‘ or “? ..
 * _Parse error: syntax error, unexpected T\_STRING, expecting ‘,’ or ‘;’ in /home/
   hmcc/domains/hmcc.nl-web.net/public\_html/hst/wp-content/themes/HST/page-team.
   php on line 74_
 * The first line visible here is 70. The error is in the first ‘echo’ line.
 * Any help is welcome!
 *     ```
       <ul class="team">
       <?php
           $pfportfolio = new WP_Query( 'post_type=ons_team' );
           while ( $pfportfolio->have_posts() ) : $pfportfolio->the_post();
               echo '<li data-id="post-' . get_the_ID() . '" data-type="<?php echo custom_taxonomy_terms_slugs( 'afdelingen' ); ?>">';
               echo '<div id="team-post">';
               echo '<div id="team-image"><img src="<?php the_field ('foto'); ?>" /></div>';
               echo '<div class="team-mail"><a href="mailto:<?php the_field ('e-mail'); ?>">EMAIL</a></div>';
               echo '<h2><?php the_field ('naam'); ?></h2>
           	      <?php the_field ('functie'); ?>';
           	echo ' </div> </div>';
               echo '</li>';
           endwhile;
           wp_reset_postdata();
       ?>
       </ul>
       ```
   

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-56/#post-5157625)
 * Your code is not consistent when entering and leaving php. And, I believe there
   is an extra `</div>`. Try this:
 *     ```
       <ul class="team">
       <?php
          $pfportfolio = new WP_Query( 'post_type=ons_team' );
          while ( $pfportfolio->have_posts() ) : $pfportfolio->the_post();
             echo '<li data-id="post-' . get_the_ID() . '" data-type="' . custom_taxonomy_terms_slugs( 'afdelingen' ) . '">';
                echo '<div id="team-post">';
                   echo '<div id="team-image"><img src="' . the_field('foto') . '" /></div>';
                   echo '<div class="team-mail"><a href="mailto:' . the_field('e-mail') . '">EMAIL</a></div>';
                   echo '<h2>' . the_field('naam') . '</h2>';
                   the_field('functie');
                echo ' </div>';
             echo '</li>';
          endwhile;
          wp_reset_postdata();
       ?>
       </ul>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Parse error: syntax error, unexpected T_STRING’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [T_STRING](https://wordpress.org/support/topic-tag/t_string/)
 * [Unexpected](https://wordpress.org/support/topic-tag/unexpected/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-56/#post-5157625)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
