<html>
<head>
<title>text</title>
</head><body>
<?php
function fun()
{
$Num=func_num_args();
$List=func_get_args();
$Result;
for($i=$Num-1;$i>=0;$i--)
$Result.=$List[$i];
return $Result;
}
$Var1=fun(1,2,3,4);
$Var2=fun("t","n","e","d","u","t","s");
echo "$Var1<br/>";
echo "$Var2<br/>";
?>
----------------------------------------------------------------------------
页面显示》
Notice: Undefined variable: Result in D:\wamp\www\index.php on line 14Notice: Undefined variable: Result in D:\wamp\www\index.php on line 14
4321
student
----------------------------------------------------------------------------为什么会多出2个Notice,问题出在哪里
<head>
<title>text</title>
</head><body>
<?php
function fun()
{
$Num=func_num_args();
$List=func_get_args();
$Result;
for($i=$Num-1;$i>=0;$i--)
$Result.=$List[$i];
return $Result;
}
$Var1=fun(1,2,3,4);
$Var2=fun("t","n","e","d","u","t","s");
echo "$Var1<br/>";
echo "$Var2<br/>";
?>
----------------------------------------------------------------------------
页面显示》
Notice: Undefined variable: Result in D:\wamp\www\index.php on line 14Notice: Undefined variable: Result in D:\wamp\www\index.php on line 14
4321
student
----------------------------------------------------------------------------为什么会多出2个Notice,问题出在哪里
解决方案 »
- 关于伪静态的一个问题,突然忘记一段代码了
- 哪位高手指点一下
- PHP Version 4.3.2,偶尔取不到post的,为什么呢?
- 【2011年】哪些前沿的技术值得研究?
- 我的一个Php程序页必须不断刷新跑着,否则就难以接受sp的短信...
- 大牛请来看下关于php服务器加载ActiveX控件的问题
- 重起帖>>>帮排一下序啊
- 在php页面中执行这段程序 出现 document.all.form1.p.value 为空或不是对象!!
- 请问在php里是否能实现标准的smtp及pop3服务?
- 如何在mysql中使用union?急!在线等! 为什么没人理?
- 如何返回同级目录下某xls文件的文件名?
- 很奇怪!总是显示查询的问题
$Result = '';
改成在这一就行了$Result='';
for($i=$Num-1;$i>=0;$i--)
$Result.=$List[$i];