I want to be able to pull in 'mini' php scripts into some text. The context is a CMS. I have prepared scripts that generate a contact form for example. I want to be able to include it in the flow of editable text with something like [script]contactform.php[/script].
The only way I can get it to work is to 'require' it as the CMS is parsing the text. Unfortunately, this means it gets output right then, rather than appearing within the text at the point of the [script] tag.
I realise the problem is that PHP is running as it's reading, so it might be an impossible task.
Has anyone tried anything like this? Thanks!