计算/比较数组与其他数组并获取值

时间:2017-08-21 11:55:06

标签: php arrays

我有一个场景,我有多个阵列。

以下是数组

$main_heading = [Main Heading 1, Main Heading 2, Main Heading 3, Main Heading 4];

    $sub_heading1 = [Sub Heading1]; 

$sub_heading2 = [Sub Heading2, Sub Heading2]; 

$sub_heading3 = [Sub Heading3, Sub Heading3, Sub Heading3];

 $sub_heading4 = [Sub Heading4, Sub Heading4, Sub Heading4, Sub Heading4];

我对所有implode使用$subheading,现在它转换为以下所示的一个数组

$sub_heading=[Sub Heading1 - Sub Heading2, Sub Heading2 -  Sub Heading3, Sub Heading3, Sub Heading3 - Sub Heading4, Sub Heading4, Sub Heading4, Sub Heading4 ];

现在我有另外两个数组

$main_headin_score = [good, strong, Adequate, Need Improvements];

$sub_heaing_score = [good, strong, Adequate, Need Improvements, good, strong, Adequate, Need Improvements, good, strong];

以下Pic显示了我希望如何在enter image description here

中保存此数据

0 个答案:

没有答案