array(1) {
["value"] => array(1000) {
[0]=> array(9) {
["PartitionKey"]=> string(11)"AWT-GPI.com"
["RowKey"]=> string(36) "0024a6ac-6cf1-454a-91b2-15bfec3a3d86"
["Timestamp"]=> string(28) "2016-09-09T20:16:26.8674483Z"
["Email"]=> string(20) "ginyoung30@gmail.com"
["First_Name"]=> string(8) "Jennifer"
["Hash"]=> string(32) "d656d0c21b8f3c14fe03232bb68d1b53"
["IP_1"]=> string(0) ""
["Last_Name"]=> string(5) "Young"
["Username"]=> string(9) "flacobell"
}
[1]=> array(9) {
["PartitionKey"]=> string(11) "AWT-GPI.com"
["RowKey"]=> string(36) "002c00c4-e064-43e8-9dd8-319c8d6663bd"
["Timestamp"]=> string(28) "2016-09-09T20:19:54.5500874Z"
["Email"]=> string(22) "Glenn@flavorleague.com"
["First_Name"]=> string(1) "G"
["Hash"]=> string(32) "1444a7b2c86506158013d1175137eede"
["IP_1"]=> string(0) "" ["Last_Name"]=> string(6) "Wilson"
["Username"]=> string(13) "misterspeed76"
}
}
}
那就是使用此代码的数组
$count = count($null_check);
for ($i = 0; $data < $count; $i++) {
foreach ($null_check['value'][$i] as $key => $data) {
$parsed_key = str_replace('_', ' ', $key);
echo $parsed_key.': '.$data.'<br>';
}
echo '<br><br>';
}
我能够得到这个输出
PartitionKey: AWT-GPI.com
RowKey: 0024a6ac-6cf1-454a-91b2-15bfec3a3d86
Timestamp: 2016-09-09T20:16:26.8674483Z
Email: ginyoung30@gmail.com
First Name: Jennifer
Hash: d656d0c21b8f3c14fe03232bb68d1b53
IP 1:
Last Name: Young
Username: flacobell
PartitionKey: AWT-GPI.com
RowKey: 002c00c4-e064-43e8-9dd8-319c8d6663bd
Timestamp: 2016-09-09T20:19:54.5500874Z
Email: Glenn@flavorleague.com
First Name: G
Hash: 1444a7b2c86506158013d1175137eede
IP 1:
Last Name: Wilson
Username: misterspeed76
现在我想取消设置RowKey
and Timestamp
,但是当我在foreach
声明中这样做时
unset($null_check['RowKey'];
它不起作用,我为每个外部或内部创建一个单独的,不起作用,我使用分配的值foreach
不起作用。从字面上看,没有任何作用。这只是我有大约30个这样的部分。所有相同的格式,我只想删除RowKey
和Timestamp
键,我该怎么做?