查找字符串在另一字符串中第一次出现的位置
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;
}