<?php // fix microsoft word copy and paste! $search = array(chr(145), chr(146), chr(147), chr(148), chr(150), chr(151)); $replace = array( "'", "'", '"', '"', '--', '-'); $str = str_replace($search, $replace, $str);