查找字符串在另一字符串中第一次出現的位置
strpos() 函數
編碼轉換
iconv("utf-8","gb2312//IGNORE",$content);
xml轉換爲數組
/**
* [getWeather 將xml轉換爲數組]
* @param string $xml [description]
* @return [type] [description]
*/
function xml2arr($xml){
$obj = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
$json = json_encode($obj);
$arr = json_decode($json, true);
return $arr;
}