note 73489 deleted from function.str-replace by cmb

From: Date: Sun, 15 Sep 2019 14:55:10 +0000
Subject: note 73489 deleted from function.str-replace by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212223@lists.php.net to get a copy of this message
Note Submitter: kole ---- My input is MS Excel file but I want to save ‘,’,“,” as ',',",". $badchr = array( "\xc2", // prefix 1 "\x80", // prefix 2 "\x98", // single quote opening "\x99", // single quote closing "\x8c", // double quote opening "\x9d" // double quote closing ); $goodchr = array('', '', '\'', '\'', '"', '"'); str_replace($badchr, $goodchr, $strFromExcelFile); Works for me.

« previous php.notes (#212223) next »