当前位置: 首页 > news >正文

模板建网站怎么做seo/百度指数移动版

模板建网站怎么做seo,百度指数移动版,java做网站微信公众选件,做设计的分析图网站有哪些array_diff — 计算数组的差集 说明: array array_diff ( array $array1 , array $array2 [, array $... ] )  对比返回在 array1 中但是不在 array2 及任何其它参数数组中的值。注意键名保留不变。 注意:本函数只检查了多维数组中的一维。如果想比较更…

  array_diff — 计算数组的差集

  说明:

  array array_diff ( array $array1 , array $array2 [, array $... ] )  对比返回在 array1 中但是不在 array2 及任何其它参数数组中的值。注意键名保留不变。

  注意:本函数只检查了多维数组中的一维。如果想比较更深的维度需要另写一个函数,今天的工作就遇到了这样的需求,所以写了一个函数来比较更深的维度。

  

<?php
header("Content-type:text/html;charset=utf-8");
$json1='{ "filedir":"default", "pages" : [ { "name" : "首页", "blocks":[ { "name":"头部标题栏", "blocktype":"title_bar", "settings":{ "is_show":true, "bg_color":"#1eb7a4", "content_switch":true, "content":"", "bg_url":"", "color":"#fff", "border_bottom_color":"", "border_bottom_width":"0" } }, { "name":"头部广告图", "blocktype":"ad_picture", "settings":{ "is_show":true, "bg_url":"" } }, { "name":"广告", "blocktype":"ad", "settings":{ "is_show":true, "number":5, "show_type":"scroll" } }, { "name":"菜单", "blocktype":"menu", "settings":{ "is_show":true, "bg_color":"#fff", "color":"#1eb7a4" } }, { "name":"个人中心", "blocktype":"personal_center", "settings":{ "is_show":true, "bg_color":"#fff", "color":"#1eb7a4" } }, { "name":"上网按钮", "blocktype":"online_button", "settings":{ "is_show":true, "offline_bg_url":"", "online_bg_url":"" } } ] }, { "name" : "登录页", "blocks":[ { "name":"页面背景", "blocktype":"page_bg", "settings":{ "is_show":true, "bg_url":"", "bg_color":"" } }, { "name":"logo图", "blocktype":"logo", "settings":{ "is_show":true, "bg_url":"" } }, { "name":"登录模块", "blocktype":"login", "settings":{ "is_show":true, "success_url":"" } } ] }, { "name" : "认证过程页", "duration":"5", "blocks":[ { "name":"页面背景", "blocktype":"page_bg", "settings":{ "is_show":false, "bg_url":"" } }, { "name":"登录动画", "blocktype":"login_animate", "settings":{ "is_show":true, "bg_url":"" } } ] }, { "name" : "登录成功页", "blocks":[ { "name":"头部广告图", "blocktype":"ad_picture", "settings":{ "is_show":true, "bg_url":"" } }, { "name":"成功页app", "blocktype":"apps", "settings":{ "is_show":true } }, { "name":"成功页提示信息", "blocktype":"success_tips", "settings":{ "is_show":false, "color":"#fff", "content":"" } } ] }, { "name" : "广告细览页", "blocks":[ { "name":"头部标题栏", "blocktype":"title_bar", "settings":{ "is_show":true, "bg_color":"#1eb7a4", "content_switch":true, "content":"", "bg_url":"", "color":"#fff", "border_bottom_color":"", "border_bottom_width":"0" } } ] } ] }';$json2='{ "filedir":"default", "pages" : [ { "name" : "首页", "blocks":[ { "name":"头部标题栏", "blocktype":"title_bar", "settings":{ "is_show":true, "bg_color":"#1eb7a4", "content_switch":true, "content":"", "bg_url":"", "color":"#fff", "border_bottom_color":"", "border_bottom_width":"0" } }, { "name":"头部广告图", "blocktype":"ad_picture", "settings":{ "is_show":true, "bg_url":"" } }, { "name":"广告", "blocktype":"ad", "settings":{ "is_show":true, "number":5, "show_type":"scroll" } }, { "name":"菜单", "blocktype":"menu", "settings":{ "is_show":true, "bg_color":"#fff", "color":"#1eb7a4" } }, { "name":"个人中心", "blocktype":"personal_center", "settings":{ "is_show":true, "bg_color":"#fff", "color":"#1eb7a4" } }, { "name":"上网按钮", "blocktype":"online_button", "settings":{ "is_show":true, "offline_bg_url":"", "online_bg_url":"" } } ] }, { "name" : "登录页", "blocks":[ { "name":"页面背景", "blocktype":"page_bg", "settings":{ "is_show":true, "bg_url":"", "bg_color":"" } }, { "name":"logo图", "blocktype":"logo", "settings":{ "is_show":true, "bg_url":"" } }, { "name":"登录模块", "blocktype":"login", "settings":{ "is_show":true, "success_url":"" } } ] }, { "name" : "认证过程页", "duration":"5", "blocks":[ { "name":"页面背景", "blocktype":"page_bg", "settings":{ "is_show":false, "bg_url":"" } }, { "name":"登录动画", "blocktype":"login_animate", "settings":{ "is_show":true, "bg_url":"" } } ] }, { "name" : "登录成功页", "blocks":[ { "name":"头部广告图", "blocktype":"ad_picture", "settings":{ "is_show":true, "bg_url":"" } }, { "name":"成功页app", "blocktype":"apps", "settings":{ "is_show":true } }, { "name":"成功页提示信息", "blocktype":"success_tips", "settings":{ "is_show":false, "color":"#fff", "content":"" } } ] }, { "name" : "广告细览页", "blocks":[ { "name":"头部标题栏", "blocktype":"title_bar", "settings":{ "is_show":true, "bg_color":"#1eb7a4", "content_switch":true, "content":"", "bg_url":"", "color":"#fff", "border_bottom_color":"", "border_bottom_width":"0" } } ] } ] }';$array1=json_decode($json1,true);
$array2=json_decode($json2,true);function array_recursive_diff($array1, $array2) {$result = array();foreach ($array1 as $key1 => $value1) {if (array_key_exists($key1, $array2)) {if (is_array($value1)) {$diff = array_recursive_diff($value1, $array2[$key1]);if (count($diff)) { //这个位置进行优化:判断!empty($diff)$result[$key1] = $diff;}} else {if ($value1 != $array2[$key1]) {$result[$key1] = $value1;}}} else {$result[$key1] = $value1;}}return $result;
}$result=array_recursive_diff($array1, $array2);
echo '<pre>';
var_dump($result);if(empty($result)){echo '完全相同';
}else{echo '完全不相同';
}

 

  

  

  

如果您阅读过此文章有所收获,请为我顶一个,如果文章中有错误的地方,欢迎指出。

相互学习,共同进步!

 

转载于:https://www.cnblogs.com/zhangxiaoliu/p/5051212.html

http://www.jmfq.cn/news/5032261.html

相关文章:

  • 网游开发软件/搜索引擎营销优化的方法
  • 平谷重庆网站建设/百度识图查图片
  • 做房地产用什么网站好/优化设计单元测试卷
  • 南京做机床的公司网站/怎么注册网站免费的
  • 梁朝伟做汤唯视频网站/营销传播
  • 网站开发需要学什么语言/高端定制网站建设
  • 网站建设增值税税率是多少钱/百度seo软件曝光行者seo
  • 重庆找网站推广/如何设计网站步骤
  • 影视传媒广告公司网站模板/网络优化论文
  • wordpress 香港繁体/seo人员是什么意思
  • 青岛专业做商业房的网站/最新国际新闻10条
  • 网站制作关键/外贸业务推广
  • 宁德工程建设监督网站/新闻头条今日要闻国内新闻最新
  • 如何用手机建设网站/网站建设公司哪家好?
  • 网站被挂马做js跳转/百度上怎么免费开店
  • 中小企业建网站/百度搜索链接入口
  • 政府网站建设先进经验交流材料/seo运营
  • 提供手机网站制作/一键免费创建论坛网站
  • 济南网站建设阝力荐聚搜网/抖音广告投放代理商
  • 荧光字体制作网站/seo博客教程
  • 网站规划包括哪些方面/南宁seo排名外包
  • 微信网站建设企业/百度seo优化哪家好
  • 网站开发的职业技术方面/网站优化网站
  • 网站seo设计方案案例/百度推广运营这个工作好做吗
  • 网站开发与维护专业/seo基础入门免费教程
  • 学校门户网站建设报告/网站seo报价
  • 做淘宝客没网站吗/盘多多搜索引擎入口
  • 网站公安备案怎么备案/百度开车关键词
  • 网上做效果图的平台/官网seo优化找哪家做
  • 手机网站的做/百度推广方案