Answer the question
In order to leave comments, you need to log in
How to recursively replace spaces in array keys with underscores?
There is an array with dynamic data.
Added like this.
$item->characteristics[$v->characteristic->name] = $v->value;
[
{
"id": "o_164",
"created_at": "2010-02-16 15:12:00",
"items": [
{
"name": "Стул ()",
"price": 2170,
"quantity": 4,
"uid": "",
"characteristics": {
"Раскладной": "нет",
"Жесткость стульев": "Мягкие стулья",
"Ширина c пробелом": 440
}
}
]
}
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question