I wasn’t sure of the exact terminology used, so please feel free to rename the title of this post to something more meaningful.
I’ve created a module for the Sphinx full-text search engine. I’m now working on the plugin-side of things - displaying the search results.
I’ve defined a function called ‘search_results’ which right now just returns an array of rows from a DB query. What I want to do is have variables/EE tags in my template and substitute those placeholders for each record in the array.
For example… I want my template to look like the following:
{exp:sphinx:search_results}
{title} <!—I’m not sure how to do the substitution in the background, recursively—>
{/exp:sphinx:search_results}
If I wasn’t dealing with multiple records, I think I could just use preg_replace() - but since there I’m dealing with an array I’m confused and not sure how to go about it.
I look forward to a reply.
Thanks for your help,
Mike
