@Httdientee

Проблема с массивом php?

Как мне правильно доставать информацию из массива? Я достаю ошибки вылазят Illegal string offset 'RetailPrice' Uninitialized string offset: 3
$item[3]['RetailPrice'];

spoiler
string(2) "OK"
int(200)
array(0) {
}
array(100) {
  [0]=>
  array(12) {
    ["PartId"]=>
    int(101)
    ["PartNumber"]=>
    string(6) "454512"
    ["AltPartNumber"]=>
    string(12) "023275096509"
    ["MfgPartNumber"]=>
    string(9) "WL0009650"
    ["Description1"]=>
    string(28) "CAULK,10 OZ 40YR PRO V,WHITE"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(11500)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(1.77)
    ["StockOnHand"]=>
    float(0)
  }
  [1]=>
  array(12) {
    ["PartId"]=>
    int(102)
    ["PartNumber"]=>
    string(6) "454544"
    ["AltPartNumber"]=>
    string(12) "023275006102"
    ["MfgPartNumber"]=>
    string(7) "WL00610"
    ["Description1"]=>
    string(27) "CAULK,ALL PURPOSE GRAY,10OZ"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(11500)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(2.78)
    ["StockOnHand"]=>
    float(0)
  }
  [2]=>
  array(12) {
    ["PartId"]=>
    int(103)
    ["PartNumber"]=>
    string(6) "454557"
    ["AltPartNumber"]=>
    string(12) "023275007109"
    ["MfgPartNumber"]=>
    string(7) "WL00710"
    ["Description1"]=>
    string(28) "CAULK,ALL PURPOSE CEDAR,10OZ"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(10500)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(2.82)
    ["StockOnHand"]=>
    float(0)
  }
  [3]=>
  array(12) {
    ["PartId"]=>
    int(104)
    ["PartNumber"]=>
    string(6) "454558"
    ["AltPartNumber"]=>
    string(12) "023275008106"
    ["MfgPartNumber"]=>
    string(7) "WL00810"
    ["Description1"]=>
    string(28) "CAULK,ALL PURPOSE BROWN,10OZ"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(12000)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(2.82)
    ["StockOnHand"]=>
    float(0)
  }
  [4]=>
  array(12) {
    ["PartId"]=>
    int(105)
    ["PartNumber"]=>
    string(6) "454559"
    ["AltPartNumber"]=>
    string(12) "023275009103"
    ["MfgPartNumber"]=>
    string(7) "WL00910"
    ["Description1"]=>
    string(28) "CAULK ALL PURPOSE BRONZE,10O"
    ["Description2"]=>
    string(1) "Z"
    ["Weight"]=>
    float(11000)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(2.82)
    ["StockOnHand"]=>
    float(0)
  }
  [5]=>
  array(12) {
    ["PartId"]=>
    int(106)
    ["PartNumber"]=>
    string(6) "454560"
    ["AltPartNumber"]=>
    string(12) "023275010109"
    ["MfgPartNumber"]=>
    string(7) "WL01010"
    ["Description1"]=>
    string(28) "CAULK,ALL PURPOSE ALMOND,10O"
    ["Description2"]=>
    string(1) "Z"
    ["Weight"]=>
    float(11500)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(2.82)
    ["StockOnHand"]=>
    float(0)
  }
  [6]=>
  array(12) {
    ["PartId"]=>
    int(107)
    ["PartNumber"]=>
    string(6) "454511"
    ["AltPartNumber"]=>
    string(12) "023275025110"
    ["MfgPartNumber"]=>
    string(7) "WL02510"
    ["Description1"]=>
    string(28) "CAULK,TUB/TILE,10.1 OZ,WHITE"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(10000)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(3.39)
    ["StockOnHand"]=>
    float(0)
  }
  [7]=>
  array(12) {
    ["PartId"]=>
    int(108)
    ["PartNumber"]=>
    string(6) "454561"
    ["AltPartNumber"]=>
    string(12) "023275140721"
    ["MfgPartNumber"]=>
    string(7) "WL08012"
    ["Description1"]=>
    string(27) "GLAZING COMPOUND,WHITE,10OZ"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(12500)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(2.82)
    ["StockOnHand"]=>
    float(0)
  }
  [8]=>
  array(12) {
    ["PartId"]=>
    int(109)
    ["PartNumber"]=>
    string(6) "355374"
    ["AltPartNumber"]=>
    string(12) "044427400708"
    ["MfgPartNumber"]=>
    string(5) "WL100"
    ["Description1"]=>
    string(22) "UTILITY WORKLIGHT,100W"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(20000)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(10.89)
    ["StockOnHand"]=>
    float(5)
  }
  [9]=>
  array(12) {
    ["PartId"]=>
    int(110)
    ["PartNumber"]=>
    string(6) "454510"
    ["AltPartNumber"]=>
    string(12) "023275205109"
    ["MfgPartNumber"]=>
    string(7) "WL20510"
    ["Description1"]=>
    string(28) "CAULK,10 OZ BOLT FAST-DRY,WH"
    ["Description2"]=>
    string(1) "T"
    ["Weight"]=>
    float(10000)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(3.99)
    ["StockOnHand"]=>
    float(0)
  }
  [10]=>
  array(12) {
    ["PartId"]=>
    int(111)
    ["PartNumber"]=>
    string(6) "454503"
    ["AltPartNumber"]=>
    string(12) "023275300101"
    ["MfgPartNumber"]=>
    string(7) "WL30010"
    ["Description1"]=>
    string(23) "CAULK,PAINTER'S,10.1 OZ"
    ["Description2"]=>
    string(0) ""
    ["Weight"]=>
    float(12000)
    ["CoreCharge"]=>
    float(0)
    ["QtyOnOrder"]=>
    float(0)
    ["Taxable"]=>
    bool(true)
    ["RetailPrice"]=>
    float(1.72)
    ["StockOnHand"]=>
    float(0)
  }
}
  • Вопрос задан
  • 72 просмотра
Пригласить эксперта
Ответы на вопрос 1
sergiks
@sergiks Куратор тега PHP
♬♬
$item['RetailPrice']
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы