PHPɾ³ýÊý×éÖеÄij¸öÔªËØ
PHPÊý×麯ÊýÖÐòËÆûÓÐÌṩɾ³ýÊý×éÖеÄij¸öÔªËصĺ¯Êý
µ«È´ÓÐÒ»¸öarray_search£¨²éÕÒÊý×éÖеÄij¸öÔªËØ£¬²¢·µ»ØÆä¼üÃû£©
ÄÇô¾ÍÓÃÒ»ÏÂËüÁË
$array_key = array_search($target_value,$target_array);
if($array_key||$array_key==0)unset($target_array[$target_value]);
//ÕâÀïµÄÌõ¼þÓÃ$array_key!==falseÒ²ÊÇ¿ÉÒԵİÉ
OKÁË
±¾À´ÏëÖ±½Ó
$target_array[$target_value] = NULL;
¶ø²»ÏëÓÃunsetµÄ
¼ÇµÃÀÏʦ˵°ÑÒ»¸ö±äÁ¿¸³ÖµÎªNULL¾ÍÏ൱ÓÚunsetµôÁË
ÒòΪºÃÏñÔÚÄÄÀï¿´µ½Ëµ¸³ÖµµÄЧÂÊÒª±Èº¯ÊýµÄЧÂʸߺܶà
¾ÍÏñ×îºÃÓÃ
$array[] = $value;
´úÌæ
array_push($array,$value);
Ò»Ñù
µ«ºóÀ´Ò»²âÊÔ·¢ÏÖ²»ÐÐ
$target_array[$target_value] = NULL;
µÄ»°
Êý×éÀﻹÊÇÓÐÕâ¸öÔªËØ£¬Ö»²»¹ýֵΪNULLÁË
ËùÒÔ»¹ÊÇÀÏÀÏʵʵµÄunsetµÄ°É
Ïà¹ØÎĵµ£º
Í·²¿µ÷ÓÃ
<?
require('conn.php');
$sql1="select id from news";
$query1=mysql_query($sql1,$conn);
$sun_num=mysql_num_rows($query1);
$gs=20;
$page_num=ceil($sun_num/$gs);
include("../subpage.php");
//´«¹ýÀ´µÄÒ³Êý²ÎÊý
$PB_page=$_GET['PB_page'];
if ($PB_page==1 or empty($PB_page)){
$ ......
htmlspecialchars()
º¯Êý°ÑһЩԤ¶¨ÒåµÄ×Ö·ûת»»Îª HTML ʵÌå¡£
ENT_COMPAT - ĬÈÏ¡£½ö±àÂëË«ÒýºÅ¡£
eg:" £¨Ë«ÒýºÅ£© ³ÉΪ "
implode()
º¯Êý°Ñ
Êý×éÔªËØ×éºÏΪһ¸ö×Ö ......
ÎÄ/Fenying
¡¡¡¡ÀýÈçÓг£ÓÃʱ¼ä¸ñʽ yyyy-mm-dd HH:ii:ss£¬ÈçºÎת»»³ÉPHPÖÐdateº¯Êý¿ÉʹÓõÄʱ¼ä¸ñʽÄØ£¿
¡¡¡¡Ê¹Óà PHPTimeFormatfromCommon() ¿ÉÒÔ°ÑͨÓÃʱ¼ä¸ñʽת»»³ÉPHPʱ¼ä¸ñʽ
¡¡¡¡¡¡¡¡PHPTimeFormatfromCommon('yyyy-mm-dd HH:ii:ss') => 'Y-m-d H:i:s'
¡¡¡¡Ê¹Óà PHPTimeFormatToCommon() ¿ÉÒÔ° ......
ÔÀí£º¸ù¾Ý²»Í¬µÄIPͳ¼Æ³öµ±Ç°ÓжàÉÙÈËÔÚÏß¡£
ʵÏÖ·½Ê½£º¿ÉÒÔÓÃÊý¾Ý¿â£¬Ò²¿ÉÒÔÓÃÎı¾¡£
ÎÒÕâÀïÓÃÁËÎı¾ÊµÏÖ¡£
<?php
/**
*@ Date 2010.04.07
*@ Author »ªÏÄÖ®ÐÇ PHP100.com
*@ Blog & ......
Êý¾Ý¿âÊÇ ´¿ÕæÊý¾Ý¿â ¸ñʽΪ UTF-8 txt¸ñʽ
phpÎļþÊÇUTF-8±àÂë
demo : http://dreamnight.gicp.net/zendphp/IP/connect.swf
flash¶Ë£º
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.ProgressEvent;
//i ......