este es lo que me regresa la API
Código HTML:
[ { "id": "5a162db4-4443-4ee8-828a-372562230bf9", "supplyItemNumber": "PDH2OS001", "type": "Machine", "category": "Coolants & Lubricants", "priority": "Alto", "group": "Lubricants", "description": "", "customerUnitPrice": 0.00, "inventoryUnit": "Litre", "briefDescription": "", "accountId": null, "manufacturerCode": null, "supplierId": null, "manufacturerItemNumber": "", "manufacturerItemRevision": "", "manufacturerText": "", "createdDate": "2018-12-11T22:57:58Z", "createdById": "6e6a5c41-f62c-460b-96f4-fcab58381bbe", "modifiedDate": "2019-03-06T15:46:56Z", "modifiedById": "6e6a5c41-f62c-460b-96f4-fcab58381bbe", "taxCodeNumber": null, "maxQuantity": 0.00, "minQuantity": 0.00 }, { "id": "96d85b76-5231-4ce4-95fc-7fa9c915caab", "supplyItemNumber": "PDH2OS002", "type": "Machine", "category": "Coolants & Lubricants", "priority": "Alto", "group": "Lubricants", "description": "", "customerUnitPrice": 0.00, "inventoryUnit": "Litre", "briefDescription": "", "accountId": null, "manufacturerCode": null, "supplierId": null, "manufacturerItemNumber": "", "manufacturerItemRevision": "", "manufacturerText": "", "createdDate": "2018-12-11T22:57:58Z", "createdById": "6e6a5c41-f62c-460b-96f4-fcab58381bbe", "modifiedDate": "2019-03-06T15:46:45Z", "modifiedById": "6e6a5c41-f62c-460b-96f4-fcab58381bbe", "taxCodeNumber": null, "maxQuantity": 0.00, "minQuantity": 0.00 } ]
Código PHP:
Ver original
echo "El número 5 está en el indice: " . $indice;
pero me regresa el siguiente error
Warning: array_search() expects parameter 2 to be array, string given in