易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP数据结构——线性表的删除

function delete_array_element($arr,$i) {
$len = count($arr);
for($j=$i; $j<$len; $j++) {
$arr[$j] = $arr[$j+1];
}
array_pop($arr);//将数组的最后一个单元弹出
return $arr;
}
for($i=0; $i<10; $i++) {
$arr1[$i] = $i+1;
}
print_r($arr1);
echo "<br>";
print_r(delete_array_element($arr1,5));
输出结构:
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 )
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 7 [6] => 8 [7] => 9 [8] => 10 )


相关文档:

PHP各种Template系统


搜集不全,链接没有全部测试,大部分可用
Easy Template System
http://ets.sourceforge.net/
http://ets.sourceforge.net/ets.pdf
http://prdownloads.sourceforge.net/ets/ets305b.zip?download
Smarty
http://smarty.php.net/
FastTemplate
http://www.thewebmasters.net/php/FastTemplate.phtml
http://www ......

【转】 php中require注意事项

【转自】:http://blog.miaoheguang.tk/archives/11
被PHP的include路径弄晕了。自己试验一通,总结如下。
定义A=包含文件 B=被A包含的文件 C=被B包含的文件
也就是说 A 包含 B, B包含C
A中有
Php 代码
require ‘[B路径]‘ //(这里 的require可以换成require_once include)
require ‘[B路径]&l ......

PHP批量删除技巧


首先要了解sql语句  
 
$SQL="delete from `PHP100` where id in (1,2,4)";
表单大概是:
 
<form action="" method="post">
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>
<i ......

PHP 高效写法

0、用单引号代替双引号来包含字符串,这样做会更快一些。因为PHP会在双引号包围的字符串中搜寻变量,单引号则不会,注意:只有echo能这么
做,它是一种可以把多个字符串当作参数的“函数”(译注:PHP手册中说echo是语言结构,不是真正的函数,故把函数加上了双引号)。
  1、如果能将类的方法定义成static,就 ......

PHP的日期时间运算总结




<?php
//GB2312的Encode
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
/*重点了解strtotime()函数
1、strftime比time()好用,可以直接把常用的’2010-02-03‘转成时间戳。
2、date( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号