An experiment in dynamic recipes

Dynamic content doesn’t seem to have reached the field of culinary art yet — but it could have one very neat application:

  • You tell a computer what ingredients you have, and it tells you what to make

As a small experiment, this PHP script (source code) will suggest fruit combinations for making citrus cordial, based on what is available. It will also tell you how much sugar, citric acid, and tartaric acid you will need.

If you live in a region with some very exotic citrus fruit, then you can easily modify the fruit list at the top of the code, and run a copy locally.