Title: [Plugin: Posts 2 Posts] Parse error: syntax error, unexpected &#039;;&#039;
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Parse error: syntax error, unexpected ';'

 *  Resolved [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-parse-error-syntax-error-unexpected/)
 * Hello,
    I’ve a strange error when inserting `'title' => array( 'from' => 'Managed
   by', 'to' => 'Manages'` as explained in the Wiki. I’ve got this error: `Parse
   error: syntax error, unexpected ';' in (changed)\wp-content\themes\dotb-lian -
   Copie\functions.php on line 162` For the moment, I’ve got this error only with
   title array…
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-parse-error-syntax-error-unexpected/#post-2419512)
 * I’m pretty sure it’s your code. Pasting the entire call to p2p_register_connection_type()
   would help.
 *  Thread Starter [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-parse-error-syntax-error-unexpected/#post-2419534)
 *     ```
       <?php
       function my_connection_types() {
       	// Make sure the Posts 2 Posts plugin is active.
       	if ( !function_exists( 'p2p_register_connection_type' ) )
       		return;
   
       	p2p_register_connection_type( array(
       		'id' => 'page_un',
       		'from' => 'webcomic',
       		'to' => 'webcomic',
       		'sortable' => 'any'
       		)
       		);
       }
       add_action( 'init', 'my_connection_types', 100 );
       ?>
       ```
   
 * I’ve put this. If I try
 *     ```
       <?php
       function my_connection_types() {
       	// Make sure the Posts 2 Posts plugin is active.
       	if ( !function_exists( 'p2p_register_connection_type' ) )
       		return;
   
       	p2p_register_connection_type( array(
       		'id' => 'page_un',
       		'from' => 'webcomic',
       		'to' => 'webcomic',
       		'sortable' => 'any',
       		'title' => array( 'from' => 'Managed by', 'to' => 'Manages'
       		)
       		);
       }
       add_action( 'init', 'my_connection_types', 100 );
       ?>
       ```
   
 * I’ve got the error.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-parse-error-syntax-error-unexpected/#post-2419538)
 * You’re missing `),` at the end:
 *     ```
       'title' => array( 'from' => 'Managed by', 'to' => 'Manages' ),
       ```
   
 *  Thread Starter [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-parse-error-syntax-error-unexpected/#post-2419612)
 * You are right. Thank you again.

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

The topic ‘[Plugin: Posts 2 Posts] Parse error: syntax error, unexpected ';'’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Li-An](https://wordpress.org/support/users/li-an/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-parse-error-syntax-error-unexpected/#post-2419612)
 * Status: resolved