I have an rss pulling script that I need help with. For the summary, i need to change all the apostrophes that are pulled ( ' ) into ( \' ) $summary = $item['summary']; $summary = substr($summary,0,240)."..."; line that changes all ' to \' Code (markup):
$summary = "That's your's don't y'know?"; $summary = preg_replace("/\'/", "\\\'", $summary); echo $summary; PHP: This will produce: That\'s your\'s don\'t y\'know?