How do i abbreviate a sentence like this? Ask for help Oh online etc
$num = $_post[' v1 ']+$_post[' v2 ']+$_post[' v3 "]+$_post[' v4 ']+$_post[' v5 ']+$_post['" V6 ']+$_post[' v7 ']+$_post[' V8 ']+$ _post[' V9 ']+$_post[' V10 '];
Echo $num;
Copy code How do i abbreviate a sentence like this?
Don't want to hit so many hands
Best answer [url=http://www.111cn.cn/bbs/space.php?username=microwind] link tag Microwind[/url]
[url=http://www.111cn.cn/bbs/space.php?uid=39178] link marker [img]http://www.111cn.cn/server/avatar.php?uid=39178& Size=small[/img][/url]
for ($i =1; $i <11; $i + +) {
$temp [] = $_post[' V '. $i];
}
echo Array_sum ($temp);
???? It seems to be troublesome ... I don't know..
If $_post only contains so few, you can
echo Array_sum ($_post);
Other Solutions
for ($i =1; $i <11; $i + +) {
$temp [] = $_post[' V '. $i];
}
echo Array_sum ($temp);
???? It seems to be troublesome ... I don't know..
If $_post only contains so few, you can
echo Array_sum ($_post);
Other Solutions
Array_sum ($_post[]);
Sum this global array
Other Solutions
Array_sum ($_post[]);
Sum this global array
Iminto posted in 2009-5-11 19:00 [url=http://bbs.111cn.cn/redirect.php?goto=findpost&pid=993037&ptid=118194] link tags [Img]http://bbs.111cn.cn/images/common/back.gif[/img][/url]
Array_sum ($_post[]);
How to use it?
Other Solutions
[url=http://cn.php.net/manual/en/function.array-sum.php] link marker http://cn.php.net/manual/en/function.array-sum.php [/URL]
Other Solutions
Array_sum ($_post[]);
How to use it?
Zyyr365 published in 2009-5-11 19:03 [url=http://bbs.111cn.cn/redirect.php?goto=findpost&pid=993040&ptid=118194] Link marker [Img]http://bbs.111cn.cn/images/common/back.gif[/img][/url]
[Img]http://www.111cn.cn/bbs/images/smilies/default/02.gif[/img]
That's it, it's a function ...
Other Solutions
Array_sum--Calculates the and of all values in the array
Description
Number Array_sum (array array)
Array_sum () returns the value of all the values in the array and the result of an integer or floating-point number.
So it's getting into the array, and ...
See I try ~
Other Solutions
I think of another way.
for ($i =1; $i <=10; $i + +) {
$num + = $_post[' V '. $i];
}
Echo $num;
http://www.bkjia.com/PHPjc/632514.html www.bkjia.com true http://www.bkjia.com/PHPjc/632514.html techarticle How do i abbreviate a sentence like this? Help Oh online etc $num = $_post[' v1 ']+$_post[' v2 ']+$_post[' v3 ']+$_post[' v4 ']+$_post[' v5 ']+$_post[' V6 ']+$_post[' v7 ']+$_post[' V8 ']+$_post[' v9 ']+$_p ...