Beware of stray apostrophes

| 0 comments

One stray apostrophe or double quote in a string of javascript variables can keep everything after it from working. One way to get rid of them:

$row['title'] = str_replace("'", "'", $row['title'])

$row['title'] = str_replace('"', '"', $row['title'])

Other replacement entity numbers can be found here.

Leave a Reply

Required fields are marked *.

*