title: Many to Many Relations in YII
body: <p>I'm trying to create a blog system using YII. Examples and Tutorials are available. But they use a multi-value table for a Post. Its something like</p>
  
  <p><kbd> Post(Id, Title, Content, Author, Tags) </kbd></p>
  
  <p>Here there are multiple values (separated by comas) in Tags column. So I created a schema to avoid this and now I have tables like this,</p>
  
  <p><kbd> Post(Id, Title, Content, Author)</kbd>
  <kbd>Tag(Id, Name)</kbd></p>
  
  <p><kbd>PostHaveTags(Post_Id, Tag_Id)</kbd></p>
  
  <p>after normalizing the schema.</p>
  
  <p>I could manage to make a relation in relations() method. But I cannot figure out how to get inputs from a view and validate values of 'tags'. Can anyone help me regarding this please? </p>
  
  <p>Thanx.</p>