标题:为什么数组打印出来多个[3]=>
只看楼主
szchina
Rank: 1
等 级:新手上路
帖 子:99
专家分:0
注 册:2012-7-31
 问题点数:0 回复次数:0 
为什么数组打印出来多个[3]=>
285Array (    [0] => 2    [1] => 8    [2] => 5    [3] =>  ) Array (    [0] => 2    [1] => 8    [2] => 5    [3] =>  ) Array (    [0] => 2    [1] => 8    [2] => 5    [3] =>  ) Array (    [0] => 2    [1] => 8    [2] => 5    [3] => )



<?php
@$f=fopen("piccounter.txt", "r") or die("Unable to open file!");
$num=fread($f, filesize("piccounter.txt"));
$num++;
fclose($f);
$fw=fopen("piccounter.txt", "w");
fwrite($fw, $num);
fclose($fw);
echo $num;
$fr=fopen("piccounter.txt", "r");
$array_count=0;
while (!feof($fr)) {
$counter_array[$array_count]=fgetc($fr);
$array_count++;
}
foreach ($counter_array as  $value) {
print_r($counter_array);
}
fclose($fr);
?>
搜索更多相关主题的帖子: file 
2013-03-07 12:10



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-399994-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014363 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved