php×Ö·û´®µÄÎÊÌâ ÔÚÏßµÈ ºÜ¼± - PHP / »ù´¡±à³Ì
ÐÂÊÖ ÎʸöÎÊÌâ
ÓÐÒ»¸ö×Ö·û´® $s = 'aa1111bbdfgaa22222bbsdfsdfdsaa33333bb';
ÎÒÏë°ÑËùÓÐaaÓëbbÖ®¼äµÄ×Ö´®Ìá³öÀ´ µÃµ½½á¹û´æÔÚÒ»¸öÊý×é$array = (1111,22222,33333);ÇëÎÊÈçºÎ×öÄØ£¿ÔÚÏߵȡ£¡£·Ö²»¶àÈ«É¢ÁË¡£¡£¸Ð¼¤²»¾¡
PHP code:
$s = 'aa1111bbdfgaa22222bbsdfsdfdsaa33333bb';
echo $s.'<br/>';
for($i=0;$i<=strlen($s);$i++){
$value = $s[$i];
if(is_numeric($value)){
$temp .=$value;
}
elseif(!empty($temp)){
$array[] = $temp;
$temp = '';
}
}
print_r($array);
PHP code:
$s = 'aa1111bbdfgaa22222bbsdfsdfdsaa33333bb';
preg_match_all ('/aa([^b]*)bb/', $s, $o);
print_r($o[1]);
PHP code:
<?php
$s = 'aa1111bbdfgaa22222bbsdfsdfdsaa33333bb';
preg_match_all('/aa([\w+]*?)bb/', $s, $result);
print_r($result[1]);
?>
лл¸÷λ ½áÌù
Ïà¹ØÎÊ´ð£º
mssql_select_db("f1",mssql_connect("localhost","sa","sa"));
mssql_select_db("f2",mssql_connect("192.168.0.1","sa","sa") ......
1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......
PHPÖÐ ÉùÃ÷±äÁ¿µÄʱºòÒ»¸ö$¸úÁ½¸ö$µÄÇø±ð
±ÈÈç˵
$var="333"; ±íʾ±äÁ¿ÃûΪ$varµÄ±äÁ¿µÄֵΪ333
$var="myvar";$$var="333";±íʾ±äÁ¿ÃûΪ$myvarµÄ±äÁ¿µÄֵΪ333
ÕâÑù˵Çå³þÁËÂð£¿
......
phpÔõôÌ滻ǰÃæµÚÒ»¸ö¡°$¡±
Äã²»寫Çå³þ,讓ÈËÔõ麼幫Äã...
¸ß¹ÀÎÒµÄ漢語ˮƽ...»òÄãµÄ±í達ÄÜÁ¦
ÒýÓÃ
Äã²»寫Çå³þ,讓ÈËÔõ麼幫Äã...
¸ß¹ÀÎÒµ ......
phpͬʱµ÷ÓÃ3¸öÊý¾Ý¿âÖеÄÒ»¸ö±íµÄÐÅÏ¢£¨¼ÜÉèA.a.aid=B.b.bid=C.c.cid£©£¬Çë˵Ã÷˼·¼°Êéд²¿·Ö´úÂë
ÀýÈ磺
SELECT time, goodid from dbname1.time, dbname2.goods
ÊÇÕâ¸öÒâ˼ô£¿
SELECT time, goodid from ......