Wondering if there is a handy preg_replace or similar function that will change all my & to & but will not change & to & (won't change an & that is already in the proper format).
I am having problem displaying a page that has (user submitted) & and I wanted to change them (from a block of text fetched from mysql) just before displaying in the page.
Help will be appreciated. Cheers.
PS: I thought of using a str_replace with an & with space on either side, but then I stopped thinking about typos like Bob &Jenny in lieu of Bob & Jenny (since user submitted).