title: Creating recommendation engine in PHP
body: <p>I'm working on a web app where the user fills a form to get recommendations of product categories, actual products and product instructions (that differ depending on category and product and answer data). The form consists of 10 questions and the answers are either 1-value (radio buttons) or multiple-value (check boxes). </p>
  
  <p>The problem is that despite the form having only 10 questions, the logic can become complex considering the many valid combinations ("recommend product category a if x or y or z are selected for answer a but not g or h for answer b..." or "if product category b recommended, add product instruction c1 but only if...or...or...but not..."). </p>
  
  <p>I'm having trouble coding the logic using if/then statements, so I'm wondering what other approaches there are? Ideally I would like to enter the logic rules outside of the code in as near natural language as possible. Also, are there any tools to diagram the logic/rules?</p>