帮忙看下这段代码错在哪?解决办法
程序员文章站
2024-04-04 17:42:53
...
帮忙看下这段代码错在哪?
$signs = array(
array( "20" => "水瓶座" ),
array( "19" => "双鱼座" ),
array( "21" => "白羊座" ),
array( "20" => "金牛座" ),
array( "21" => "双子座" ),
array( "22" => "巨蟹座" ),
array( "23" => "狮子座" ),
array( "23" => "处女座" ),
array( "23" => "天秤座" ),
array( "24" => "天蝎座" ),
array( "22" => "射手座" ),
array( "22" => "摩羯座" )
);
list( $sign_start, $sign_name ) = each( $signs[( integer )$month - 1] );
if ( $day {
list( $sign_start, $sign_name ) = each( &$signs[$month - 2 }
return $sign_name;
上面代码运行时报错:
Warning: Call-time pass-by-reference has been deprecated in E:\PHPnow-1.5.6\htdocs\source\core\util\class.lunar.php on line 2277和2274
2274行代码是list( $sign_start, $sign_name ) = each( $signs[( integer )$month - 1] );
2277行代码是list( $sign_start, $sign_name ) = each( &$signs[$month - 2
}
$signs = array(
array( "20" => "水瓶座" ),
array( "19" => "双鱼座" ),
array( "21" => "白羊座" ),
array( "20" => "金牛座" ),
array( "21" => "双子座" ),
array( "22" => "巨蟹座" ),
array( "23" => "狮子座" ),
array( "23" => "处女座" ),
array( "23" => "天秤座" ),
array( "24" => "天蝎座" ),
array( "22" => "射手座" ),
array( "22" => "摩羯座" )
);
list( $sign_start, $sign_name ) = each( $signs[( integer )$month - 1] );
if ( $day {
list( $sign_start, $sign_name ) = each( &$signs[$month - 2 }
return $sign_name;
上面代码运行时报错:
Warning: Call-time pass-by-reference has been deprecated in E:\PHPnow-1.5.6\htdocs\source\core\util\class.lunar.php on line 2277和2274
2274行代码是list( $sign_start, $sign_name ) = each( $signs[( integer )$month - 1] );
2277行代码是list( $sign_start, $sign_name ) = each( &$signs[$month - 2
}
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
- 最新文章
- 热门排行
上一篇: php 超级好用函数记要
下一篇: 外链接生成问题
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论