Let us say that I have a medication database with this format:
-----------------------------------------------
| Medication Name | Strength | Unit |
-----------------------------------------------
| NORCO | 5;325 | mg/1;mg/1 |
| Amoxicillin | 500 | mg/1 |
| Augmentin | 250;62.5 |mg/5mL; mg/5mL|
-----------------------------------------------
How can I display data in this way using php:
NORCO 5mg/325mg
Amoxicillin 500mg
Augmentin 250mg/5mL 62.5mg/5mL
removing /1
from the unit column is easy using str_replace
but how can I distribute units to strengths with a semicolon separating them?