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 )
Ïà¹ØÎĵµ£º
´Ó2.2Æð SDK ½«È«ÃæÖ§³ÖUTF-8 GB2312 µÈ¶àÖÖ¸ñʽ,Ò»Ì×SDK ¾Í¿ÉÒÔ×ÔÊÊÓ¦ÄúËùÐèÒªµÄ±àÂë,
ÄÚ´øÅäÖÃÎļþ Taoapi_Config.inc.php
×îиüÐÂ
2010-02-25 Ôö¼ÓÁ˱àÂë¸ñʽ×ÔÊÊÓ¦¹¦ÄÜ
2010-02-25 Ôö¼ÓÁËAPIµ÷ÓÃÈÕÖ¾¹¦ÄÜ,ÿÐÐÏ൱ÓÚÒ»´ÎAPIµ÷ÓÃ
2010-02-25 Ôö¼ÓÁË×Ô¶¯Çå³ý»º´æµÄ»úÖÆ
2010-02-25 Ôö¼ÓAPIµ÷Óó¬¹ýÏÞÖÆÊ±×Ô¶¯Çл»µ ......
¡¾×ª×Ô¡¿£º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 ......
Ê×ÏÈÒªÁ˽â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 ÐòÁл¯£¨serialize£©¸ñʽÏê½â
ǰÑÔ
¸ÅÊö
NULL ºÍ±êÁ¿ÀàÐ͵ÄÐòÁл¯
¼òµ¥¸´ºÏÀàÐ͵ÄÐòÁл¯
ǶÌ׸´ºÏÀàÐ͵ÄÐòÁл¯
×Ô¶¨Òå¶ÔÏóÐòÁл¯
Unicode ×Ö·û´®µÄÐòÁл¯
²Î¿¼ÎÄÏ×
1£®Ç°ÑÔ
PHP £¨´Ó PHP 3.05 ¿ªÊ¼£©Îª±£´æ¶ÔÏóÌṩÁËÒ»×éÐòÁл¯ºÍ·´ÐòÁл¯µÄº¯Êý£ºserialize¡¢unserialize¡£²»¹ýÔÚ
PHP ÊÖ²áÖжÔÕâÁ½¸öº¯ÊýµÄ ......
<?php
//--------------------
// »ù±¾Êý¾Ý½á¹¹
//--------------------
//¶þ·Ö²éÕÒ£¨Êý×éÀï²éÕÒij¸öÔªËØ£©
function bin_sch($arr, $low, $high, $k) {
if($low<=$high) {
$mid = intval(($low+$high)/2);
if($arr[$mid] == $k) {
return $mid;
} elseif($k<$ ......