时间:2021-07-01 10:21:17 帮助过:6人阅读
";
以上就介绍了招行信用卡还款日期 转换中文日期的PHP程序,包括了招行信用卡还款日期方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
$flag=0;
$cn=array("一","二","三","四","五","六","七","八","九","十","零","○");
$num=array("1","2","3","4","5","6","7","8","9","","0","0");
$len=strlen($str);
for ($i=0;$i<$len;$i+=2)
{
$array_str[$i]=substr($str,$i,2);
$cout=0;
while($cout
if ($array_str[$i]==$cn[$cout])
{
if ($flag==1)
echo "-";
if (($array_str[$i]=="十") and ($flag==1))
{
$temp[$cout]="1";
echo $temp[$cout];
$flag=2;break;
}
$temp[$cout]=$num[$cout];
echo $temp[$cout];
$flag=2;
break;
}
else
{
if (count($cn)==$cout+1)
$flag=1;
}
$cout++;
}
}
?>