- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
This is Input:-print_r($result4);
Output:-Array ( [0] => A-I-only [1] => B-III-only [2] => C-I-and-II-only [3]=> D-II-and-III-only [4] => E-I,-II,-III [5] => [6] => A-Hepatitis-A [7] => B-Hepatitis-B [8] => C-Hepatitis-C [9] => D-Hepatitis-B-and-C [10] => E-None-of-the-above [11] => [12] => A)-Cholestasis [13] => B)-Cholecystitis [14] => C)-Cholelithiasis [15] => D)-Hepatic-encephalopathy [16] => E)-Ascites [17] => [18] => A-Acetyl-salicylic-acid [19] => B-Ibuprofen [20] => C-Acetaminophen [21] => D-Pepto-Bismol [22] => E-All-of-the-above [23] => [24] => [25] => A-dark-urine [26] => B-stomach-pain [27] => C-blood-in-stools [28] => D-yellowing-of-skin [29] => E-Yellowing-of-eye-and-mucus [30] => [31] => A-Hepatitis-A [32] => B-Hepatitis-B [33] => C-Dukoral [34] => D-Gerdasil [35] => E-None-of-the-above [36] => [37] => cervical-cancer-caused-by-papilloma-virus [38] => A-Glucuronidation [39] => B-Glutathione-conjugation [40] => C-Acetylation [41] => D-Sulfate-conjugation [42] => E-Methylation [43] => [44] => A-Acetylcysteine [45] => B-cysteine [46] => C-Mercapturic-acid [47] => D-Glutathione-conjugation [48] => E-Glutathione-only [49] => [50] => administered-in-teenagers-to-prevent-cervical-cancer. [51] => A-Hepatitis-A [52] => B-Hepatitis-C [53] => C-Hepatitis-D [54] => D-Hepatitis-A,-B-&-C [55] => E-Hepatitis-A,-B-&-D [56] => [57] => [58] => A)-ALT [59] => B)-AST [60] => C)-Bilirubin- [61] => D)-Albumin [62] => E)-Proteins [63] => [64] => A--Saliva- [65] => B-Bile- [66] => C-Pancreatic-duct---- [67] => D-Gastric-secretions [68] => [69] => A)-Sexual-contact [70] => B)-Blood-transfusion [71] => C-Food-and-drink-contamination [72] => D-Traveling-abroad [73] => E-Drugs [74] => [75] => A)-Hepatitis-A-only [76] => B)-Hepatitis-B-only [77] => C)-Hepatitis-A-and-B [78] => D)-Hepatitis-A,-B-and-C [79] => E)-Hepatitis-B-and-C [80] => [81] => [82] => A)-Proton-pump-inhibitors [83] => B)-Warfarin [84] => C)-antacids [85] => D)Lipid-soluble-drugs [86] => E)-Parenteral-drugs [87] => [88] => A)-spironolactone- [89] => B)-NSAIDs- [90] => C)-acetaminophen- [91] => D)-Ibuprofen- [92] => E)-codeine [93] => [94] => A)-constipation- [95] => B)-ascites- [96] => C)-encephalitis- [97] => D)-liver-cirrhosis- [98] => E)-Hepatitis [99] => [100] => encephalitis. [101] => contaminated-hepatitis? [102] => A)-Hepatitis-A [103] => B)-Hepatitis-B [104] => C)-Hepatitis-A-and-B [105] => D)-Hepatitis-C [106] => E)-Hepatitis-D [107] => [108] => A)-Hepatitis-A [109] => [110] => B)-Hepatitis-A-and-B [111] => C)-Hepatitis-B-and-C [112] => D)-Hepatitis-A,-B,-C [113] => [114] => [115] => )
Array ( [0] => A-I-only [1] => B-III-only [2] => C-I-and-II-only [3]=> D-II-and-III-only [4] => E-I,-II,-III ) Array([6] => A-Hepatitis-A [7] => B-Hepatitis-B [8] => C-Hepatitis-C [9] => D-Hepatitis-B-and-C [10] => E-None-of-the-above )....similarly
最佳答案
下面将工作,
$new_array = array();
$i = 0;
foreach($array as $k => $v)
{
if (!empty($v))
{
$new_array[$i][$k] = $v;
continue;
}
$i++;
}
//This will fix your missing fourth index<br/>
$new_array = array_values($new_array);
var_dump($new_array);
关于php - 将大数组拆分为多个数组,其中 php 中出现空元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28184756/
我有一个数组列表: ArrayList allText = new ArrayList(); 其内容是这样的: [Alabama - Montgomery, Alaska - Juneau, Ariz
我有一个 timestamp 格式的开始和结束时间。我想将它们分成多个时间段,例如 1 小时。 $t1 = strtotime('2010-05-06 12:00:00'); $t2 = strtot
我需要将 span10 分成 3 列,但我无法将它们排列起来。我应该在 span10 中添加一个 span12 还是使用 offset 还是??
我有一个时间序列。我想从早上 8 点到第二天早上 7:59 分成 24 小时的区 block 。我知道如何按日期分组,但我尝试过使用 TimeGroupers 和 DateOffsets 处理这个 8
我收到“街道号码邮政编码城市”形式的地址(作为字符串)。我想要做的是将街道和号码与邮政编码和城市分开。通常你可以按空格分割。但有些街道名称中也有空格,例如:“Emile Van Ermengemlaa
我有一个用户列表。其中一些用户处于第一状态,而其他用户处于第二状态。所以我想要的是将这个列表显示为首先,它按排序顺序显示存在 = 1 的用户,然后按排序顺序显示存在 = 2 的用户。这里的排序是根据用
我感觉我搜索了整个网络,但找不到一种方法将不同高度的 div 很好地划分为 3 列,就像 http://www.ing.nl 上那样 headertekst headerteksttesth
Bootstrap 3 按钮下拉菜单出现问题。你可以在这里看到我的两个例子: http://www.bootply.com/W1dLusilMk http://www.bootply.com/GGBv
我在 php 中执行以下操作 foreach($QuestionAsekd as $k => $v){ $grp_name = $v['NAME']; $groupValues[$gr
我找到了一种用pandas解析html的绝妙方法。我的数据格式有点奇怪(见下文)。我想将这些数据拆分为 2 个单独的数据帧。 注意每个单元格如何由,分隔...是否有任何真正有效的方法来分割所有这些单元
HTML 看起来像这样,但我不允许对其进行更改。我只能编写 CSS 将其变成 2 列。 Povezave www.behance.net www.kiberpipa.org www.o
假设我有以下数据框“A” utilization utilization_billable service 1
我需要将 2 个文本框拉伸(stretch)到 100% 的浏览器宽度,以及一个提交按钮。所有三个都应该在一行中,我试图拉伸(stretch)它但它没有发生......有什么想法吗? 代码: .sea
我是一名优秀的程序员,十分优秀!