A
A
AdNahim2016-02-25 12:57:36
MODX
AdNahim, 2016-02-25 12:57:36

How to remove container user fields?

Greetings.
In additional fields there is a container with values.
Understood with change of these values. It, as I understand it, is an array, therefore it changed values ​​in a cycle.
But how to remove the container completely? Yes, even I think we'll start with the usual add. a field that is not a container?

$extended['моё_поле'] = "";

$profile->set('extended', $extended);
$profile->save();

changing the value to emptiness, as I wrote above, is not particularly suitable. How to remove the Add. field/container?
Thanks to.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AdNahim, 2016-02-25
@alexanderkx

Something stupid) since the container is an array, then what prevents you from doing unset ?
everything worked out.
unset($extended['мой_контейнер]);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question