这样的PHP代码怎么写 求C语言基础代码
这样的PHP代码怎么写
这样就行了。也可以上楼上说的用反序列化函数unserialize()。这种形式一般是放在数组库的 $str =a:7:{s:9:"frame_set"s:2:"lc"s:8:"allframe"a:2:{s:5:"dleft"a:8:{i:0s:7:"profile"i:1s:7:"applist"i:2s:10:"friendlist"i:3s:9:"footprint"i:4s:5:"doing"i:5s:4:"mtag"i:6s:5:"share"i:7s:6:"player"}s:8:"dcontent"a:7:{i:0s:4:"feed"i:1s:8:"albumone"i:2s:4:"blog"i:3s:8:"albumall"i:4s:6:"thread"i:5s:11:"forumstatus"i:6s:4:"wall"}}s:9:"effectall"a:0:{}s:9:"blockname"a:0:{}s:5:"music"a:0:{}s:5:"block"a:1:{s:4:"body"a:1:{s:0:""a:1:{s:16:"background-image"s:95:"background-image:url( http://127.0.0.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif)"}}}s:6:"cursor"N}background-image:url( http://1ds.0.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif)"}}background-image:url( http://127.sdf.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif)"}}background-image:url( http://1jhgk0.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif)"}} if(preg_match_all(/url((. ?))/, $str, $matches)) { foreach($matches[1] as $val) { echo $val echo "
" } } 测试结果: http://127.0.0.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif http://1ds.0.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif http://127.sdf.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif http://1jhgk0.1/pic/f7fc7f0ea9e5b753707ae20b87b8478e_b.gif 不会再问:QQ:1350630107,接5000元以上大型项目,二次开发等
求C语言基础代码
C菜鸟助手成员tonytvb为你解答(如有疑问请hi我或向我的团队提问):
#include
int main()
{
int year,month
scanf("%d %d",&year,&month)
if(month>12||monthprintf("year:%d,month:%d
",year,month)
if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
printf("31 days
")
else if(month==4||month==6||month==9||month==11)
printf("30 days
")
else if((month==2&&year@0==0)||(month==2&&year%4==0&&year0!=0))
printf("29 days
")
else printf("28 days
")
return 0
}
下面这段代码用PHP语言怎么写
$str = 姓名 王力,年龄 30,籍贯 陕西,住址 西安市雁塔区,爱好 足球
$rows = explode(,, $str)
echo  foreach($rows as $row){ $cols = explode( ,$row) echo foreach($cols as $col){ echo . $col . } echo } echo