Сортировка детей в каждом родителе субаррея многомерного массива в колонкеPhp

Кемеровские программисты php общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Сортировка детей в каждом родителе субаррея многомерного массива в колонке

Сообщение Anonymous »

Как сортировать следующий массив. < /p>

Тип измерителя массива верхнего уровня: < /p>

"с помощью умного измерителя",
"с Старомодный счетчик < /p>

Внутри те, что есть различные тарифы, которые также являются массивами. Всего с самого низкого уровня в массиве. 873.03195-sdd-e1r-var-0002_sdd-g1r-var-0002 может отличаться каждый раз. < /P>

array:2 [
"With a Smart meter" => array:3 [
"873.03195-SDD-E1R-VAR-0002_SDD-G1R-VAR-0002" => array:4 [
"electricity" => array:4 [
"code" => "SDD-E1R-VAR-0002"
"name" => "Smart Go with the flow"
"costs" => array:4 [
"year" => "464.13"
"month" => "38.68"
"week" => "8.93"
"savings" => 27.0
]
"details" => array:4 [
"name" => "Smart Go with the flow"
"unitRate" => array:3 [
"standard" => 12.4992
"night" => null
"day" => null
]
"standingCharge" => 21.0
"comparisonRate" => 14.97
]
]
"gas" => array:4 [
"code" => "SDD-G1R-VAR-0002"
"name" => "Smart Go with the flow - Gas"
"costs" => array:4 [
"year" => "408.91"
"month" => "34.08"
"week" => "7.86"
"savings" => 160.0
]
"details" => array:4 [
"name" => "Smart Go with the flow - Gas"
"unitRate" => 2.5998
"standingCharge" => 22.995
"comparisonRate" => 3.27
]
]
"display" => array:6 [
"code" => "SDD-E1R-VAR-0002_SDD-G1R-VAR-0002"
"name" => "Smart Go with the flow"
"idPaymentMethod" => "4"
"textPaymentMethod" => "Smart Direct Debit"
"costs" => array:4 [
"year" => "873.03"
"month" => "72.75"
"week" => "16.79"
"savings" => 186.0
]
"podCopy" => array:2 [
"subHeading" => "Go with the flow"
"listContent" => """
  • \r\n
    \t
  • Say goodbye to estimated billing with a TOTO smart meter\r\n
    \t
  • Keep track of your usage with our FREE Smart Meter and in-home display\r\n
"""
]
]
"total" => "873.03"
]
"1034.19225-SDD-E1R-VAR-0004_SDD-G1R-VAR-0004" => array:4 [
"electricity" => array:4 [
"code" => "SDD-E1R-VAR-0004"
"name" => "TOTO Smart Evergreen Saver"
"costs" => array:4 [
"year" => "547.32"
"month" => "45.61"
"week" => "10.53"
"savings" => -57.0
]
"details" => array:4 [
"name" => "TOTO Smart Evergreen Saver"
"unitRate" => array:3 [
"standard" => 15.183
"night" => null
"day" => null
]
"standingCharge" => 21.0
"comparisonRate" => 17.66
]
]
"gas" => array:4 [
"code" => "SDD-G1R-VAR-0004"
"name" => "TOTO Smart Evergreen Saver - Gas"
"costs" => array:4 [
"year" => "486.87"
"month" => "40.57"
"week" => "9.36"
"savings" => 82.0
]
"details" => array:4 [
"name" => "TOTO Smart Evergreen Saver - Gas"
"unitRate" => 3.2235
"standingCharge" => 22.995
"comparisonRate" => 3.89
]
]
"display" => array:6 [
"code" => "SDD-E1R-VAR-0004_SDD-G1R-VAR-0004"
"name" => "TOTO Smart Evergreen Saver"
"idPaymentMethod" => "4"
"textPaymentMethod" => "Smart Direct Debit"
"costs" => array:4 [
"year" => "1,034.19"
"month" => "86.18"
"week" => "19.89"
"savings" => 25.0
]
"podCopy" => array:2 [
"subHeading" => "Evergreen Saver"
"listContent" => """
  • \r\n
    \t
  • No contract, no end date, no hassle.\r\n
    \t
  • Say goodbye to estimated billing with a TOTO Smart meter and FREE in home display.\r\n
    \t
  • Your tariff can go up or down, we’ll always tell you first.\r\n
    \t
  • Prompt friendly service from the friendly TOTO team.
    \r\n
    \t\r\n
"""
]
]
"total" => "1,034.19"
]
"894.71025-SDD-E1R-VAR-0003_SDD-G1R-VAR-0003" => array:4 [
"electricity" => array:4 [
"code" => "SDD-E1R-VAR-0003"
"name" => "TOTO Smart Discount Variable Saver"
"costs" => array:4 [
"year" => "485.80"
"month" => "40.48"
"week" => "9.34"
"savings" => 5.0
]
"details" => array:4 [
"name" => "TOTO Smart Discount Variable Saver"
"unitRate" => array:3 [
"standard" => 13.1985
"night" => null
"day" => null
]
"standingCharge" => 21.0
"comparisonRate" => 15.67
]
]
"gas" => array:4 [
"code" => "SDD-G1R-VAR-0003"
"name" => "TOTO Smart Discount Variable Saver - Gas"
"costs" => array:4 [
"year" => "408.91"
"month" => "34.08"
"week" => "7.86"
"savings" => 160.0
]
"details" => array:4 [
"name" => "TOTO Smart Discount Variable Saver - Gas"
"unitRate" => 2.5998
"standingCharge" => 22.995
"comparisonRate" => 3.27
]
]
"display" => array:6 [
"code" => "SDD-E1R-VAR-0003_SDD-G1R-VAR-0003"
"name" => "TOTO Smart Discount Variable Saver"
"idPaymentMethod" => "4"
"textPaymentMethod" => "Smart Direct Debit"
"costs" => array:4 [
"year" => "894.71"
"month" => "74.56"
"week" => "17.21"
"savings" => 165.0
]
"podCopy" => array:2 [
"subHeading" => "Discount Variable Saver"
"listContent" => """
  • \r\n
    \t
  • Discounted rate for 12 months.\r\n
    \t
  • Say goodbye to estimated billing with a TOTO Smart meter and FREE in home display.\r\n
    \t
  • Your tariff can go up or down, we’ll always tell you first.\r\n
    \t
  • 12 month contract.\r\n
"""
]
]
"total" => "894.71"
]
]
"With an old-fashioned meter" => array:3 [
"873.03195-LDD-E1R-VAR-0002_LDD-G1R-VAR-0002" => array:4 [
"electricity" => array:4 [
"code" => "LDD-E1R-VAR-0002"
"name" => "Go with the flow 2"
"costs" => array:4 [
"year" => "464.13"
"month" => "38.68"
"week" => "8.93"
"savings" => 27.0
]
"details" => array:4 [
"name" => "Go with the flow 2"
"unitRate" => array:3 [
"standard" => 12.4992
"night" => null
"day" => null
]
"standingCharge" => 21.0
"comparisonRate" => 14.97
]
]
"gas" => array:4 [
"code" => "LDD-G1R-VAR-0002"
"name" => "Go with the flow 2 - Gas"
"costs" => array:4 [
"year" => "408.91"
"month" => "34.08"
"week" => "7.86"
"savings" => 160.0
]
"details" => array:4 [
"name" => "Go with the flow 2 - Gas"
"unitRate" => 2.5998
"standingCharge" => 22.995
"comparisonRate" => 3.27
]
]
"display" => array:6 [
"code" => "LDD-E1R-VAR-0002_LDD-G1R-VAR-0002"
"name" => "Go with the flow 2"
"idPaymentMethod" => "4"
"textPaymentMethod" => "Direct Debit"
"costs" => array:4 [
"year" => "873.03"
"month" => "72.75"
"week" => "16.79"
"savings" => 186.0
]
"podCopy" => array:2 [
"subHeading" => "Go with the flow"
"listContent" => """
  • \r\n
    \t
  • No contract, no end-date, no hassle.\r\n
    \t
  • Your tariff can go up and down, we’ll always tell you first.\r\n
    \t
  • Prompt personal service from the friendly TOTO team.\r\n
"""
]
]
"total" => "873.03"
]
"894.71025-LDD-E1R-VAR-0003_LDD-G1R-VAR-0003" => array:4 [
"electricity" => array:4 [
"code" => "LDD-E1R-VAR-0003"
"name" => "TOTO Discount Variable Saver"
"costs" => array:4 [
"year" => "485.80"
"month" => "40.48"
"week" => "9.34"
"savings" => 5.0
]
"details" => array:4 [
"name" => "TOTO Discount Variable Saver"
"unitRate" => array:3 [
"standard" => 13.1985
"night" => null
"day" => null
]
"standingCharge" => 21.0
"comparisonRate" => 15.67
]
]
"gas" => array:4 [
"code" => "LDD-G1R-VAR-0003"
"name" => "TOTO Discount Variable Saver - Gas"
"costs" => array:4 [
"year" => "408.91"
"month" => "34.08"
"week" => "7.86"
"savings" => 160.0
]
"details" => array:4 [
"name" => "TOTO Discount Variable Saver - Gas"
"unitRate" => 2.5998
"standingCharge" => 22.995
"comparisonRate" => 3.27
]
]
"display" => array:6 [
"code" => "LDD-E1R-VAR-0003_LDD-G1R-VAR-0003"
"name" => "TOTO Discount Variable Saver"
"idPaymentMethod" => "4"
"textPaymentMethod" => "Direct Debit"
"costs" => array:4 [
"year" => "894.71"
"month" => "74.56"
"week" => "17.21"
"savings" => 165.0
]
"podCopy" => array:2 [
"subHeading" => "Discount Variable Saver"
"listContent" => """
  • \r\n
    \t
  • Discounted rate for 12 months.\r\n
    \t
  • Your tariff can go up or down, we’ll always tell you first.\r\n
    \t
  • 12 month contract.\r\n
    \t
  • Prompt personal service from the friendly TOTO team.\r\n
"""
]
]
"total" => "894.71"
]
"1034.19225-LDD-E1R-VAR-0004_LDD-G1R-VAR-0004" => array:4 [
"electricity" => array:4 [
"code" => "LDD-E1R-VAR-0004"
"name" => "TOTO Evergreen Saver"
"costs" => array:4 [
"year" => "547.32"
"month" => "45.61"
"week" => "10.53"
"savings" => -57.0
]
"details" => array:4 [
"name" => "TOTO Evergreen Saver"
"unitRate" => array:3 [
"standard" => 15.183
"night" => null
"day" => null
]
"standingCharge" => 21.0
"comparisonRate" => 17.66
]
]
"gas" => array:4 [
"code" => "LDD-G1R-VAR-0004"
"name" => "TOTO Evergreen Saver - Gas"
"costs" => array:4 [
"year" => "486.87"
"month" => "40.57"
"week" => "9.36"
"savings" => 82.0
]
"details" => array:4 [
"name" => "TOTO Evergreen Saver - Gas"
"unitRate" => 3.2235
"standingCharge" => 22.995
"comparisonRate" => 3.89
]
]
"display" => array:6 [
"code" => "LDD-E1R-VAR-0004_LDD-G1R-VAR-0004"
"name" => "TOTO Evergreen Saver"
"idPaymentMethod" => "4"
"textPaymentMethod" => "Direct Debit"
"costs" => array:4 [
"year" => "1,034.19"
"month" => "86.18"
"week" => "19.89"
"savings" => 25.0
]
"podCopy" => array:2 [
"subHeading" => "Evergreen Saver"
"listContent" => """
  • \r\n
    \t
  • No contract, no end date, no hassle.\r\n
    \t
  • Your tariff can go up or down, we’ll always tell you first.\r\n
    \t
  • Prompt friendly service from the friendly TOTO team.\r\n
"""
]
]
"total" => "1,034.19"
]
< /code>

]
] < /p>

Подробнее здесь: https://stackoverflow.com/questions/421 ... by-a-colum
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Php»