php array reader µÝ¹é±éÀú php Êý×é
<?php
/*
* -------------------------------------------------
* Author : Fanglor
* Email : Fanlor@163.com
* Url : www.skyleft.com
* Date : 2009-10-13
* -------------------------------------------------
*/
function arr_foreach ($arr) {
if (!is_array ($arr)) {
return false;
}
foreach ($arr as $key => $val ) {
if (is_array ($val)) {
arr_foreach ($val);
} else {
echo $val.'<br/>';
}
}
}
$arr1 = array (1=>array(11,12,13,14=>array(141,142)),2,3,4,5);
arr_foreach ($arr1);
/*
´òÓ¡½á¹û£º
11
12
13
141
142
2
3
4
5
*/
?>
Ïà¹ØÎĵµ£º
PHP£¬Ò»¸öǶÌ×µÄËõдÃû³Æ£¬ÊÇÓ¢Îij¬¼¶Îı¾Ô¤´¦ÀíÓïÑÔ£¨PHP:Hypertext Preprocessor£©µÄËõд¡£PHP ÊÇÒ»ÖÖ HTML ÄÚǶʽµÄÓïÑÔ£¬PHPÓë΢ÈíµÄASPÆÄÓм¸·ÖÏàËÆ£¬¶¼ÊÇÒ»ÖÖÔÚ·þÎñÆ÷¶ËÖ´ÐеÄǶÈëHTMLÎĵµµÄ½Å±¾ÓïÑÔ£¬ÓïÑԵķç¸ñÓÐÀàËÆÓÚCÓïÑÔ£¬ÏÖÔÚ±»ºÜ¶àµÄÍøÕ¾±à³ÌÈËÔ±¹ã·ºµÄÔËÓá£PHP ¶ÀÌصÄÓï·¨»ìºÏÁË C¡¢Java¡¢Perl ÒÔ¼° PHP ×Ô ......
Ç°¼¸ÌìÔÚFirebugÀ©Õ¹¿ª·¢Ò»ÎÄÖоÍÌáµ½¹ýFirephpÕâ¸ö»ùÓÚFirebugµÄ²å¼þ£¬Í¨¹ýʹÓÃFirephpÄã¿ÉÒÔÔÚFirebugµÄConsoleÀ¸Öп´µ½Òªµ÷ÊÔµÄÊý¾Ý£¬¶ø²»Ó°Ïìphp³ÌÐòµÄÕý³£Ö´ÐУ¬ËùÒÔ˵£¬ÕⶫÎ÷¶ÔÓÚAjax¿ª·¢ÊǺÜÓаïÖúµÄ£¡ÏÂÃæÒ»ÆðÀ´¿´ÏÂFirephpµÄʹÓ÷½·¨¡£
µÚÒ»²½£º°²×°
1.Èç¹ûÄãµÄFireFoxûÓÐFirebugÕâ¸ö²å¼þµÄ»°£¬Ê×ÏÈÒª°²×°Fire ......
http://php.net/manual/en/reserved.variables.httprawpostdata.php
http://www.cnblogs.com/mustardpeanut/archive/2009/06/15/1503395.html
http://blog.csdn.net/letianok/archive/2009/02/27/3941731.aspx
http://www.woria.cn/blog/read.php/596.htm ......
PHP5ÖÐΪ½â¾ö±äÁ¿µÄÃüÃû³åÍ»ºÍ²»È·¶¨ÐÔÎÊÌ⣬ÒýÈë¹Ø¼ü×Ö“$this”´ú±íÆäËùÔÚµ±Ç°¶ÔÏó¡£
$thisÔÚ¹¹Ô캯ÊýÖÐÖ¸¸Ã¹¹Ô캯ÊýËù´´½¨µÄжÔÏó¡£
ÔÚÀàÖÐʹÓõ±Ç°¶ÔÏóµÄÊôÐԺͷ½·¨£¬±ØÐëʹÓÃ$this->È¡Öµ¡£
·½·¨Äڵľֲ¿±äÁ¿£¬²»ÊôÓÚ¶ÔÏ󣬲»Ê¹ÓÃ$this¹Ø¼ü×ÖÈ¡Öµ¡£
¾Ö²¿±äÁ¿ºÍÈ«¾Ö±äÁ¿Óë $this ¹Ø¼ü×Ö,ʹÓõ±Ç°¶ÔÏóµ ......
PHP5ÖÐʹÓÃparent::À´ÒýÓø¸ÀàµÄ·½·¨¡£ parent:: ¿ÉÓÃÓÚµ÷Óø¸ÀàÖж¨ÒåµÄ³ÉÔ±·½·¨¡£parent::µÄ×·Ëݲ»½öÓÚÖ±½Ó¸¸Àà¡£
ͨ¹ýparent::µ÷Óø¸Àà·½·¨
<!-- ÉùÃ÷Ò»¸öÔ±¹¤Àà,¾ÀíÀà¼Ì³Ð×ÔÔ±¹¤Àà -->
<?php
class employee
{
protected $sal = 3000;
public function getSal() {
$this->sal = $this-> ......