note 45072 added to function.count
| From: | ron at clicks2hits dot comActionpro | Date: | Wed, 25 Aug 2004 01:47:41 +0000 |
| Subject: | note 45072 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75240@lists.php.net to get a copy of this message | ||
Why use array() when using count().
<?
$countit = count($t1=file('test.txt')) + count($t2=file('test1.txt')) +
count($t3=file('test2.txt'));
$i = 0;
while ($i < $countit){
$i = 0 + $count++;
if ($this == $t1[$i]) {
$blocked ="Your e-Mail $this is banned from $sitename";
?>
<script>
window.location=("banned.php?blocked=<?php echo $blocked; ?>")
</script>
<?
exit();
}
if ($that == $t2[$i]) {
$blocked ="The word $that is banned from posting at $sitename";
?>
<script>
window.location=("banned.php?blocked=<?php echo $blocked; ?>")
</script>
<?
exit();
}
if ($andthis == $t3[$i]) {
$blocked ="IP $andthis is banned from $sitename";
?>
<script>
window.location=("banned.php?blocked=<?php echo $blocked; ?>")
</script>
<?
exit();
}
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.count.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45072
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45072&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45072&report=yes
Search -- http://master.php.net/manage/user-notes.php