What am I doing wrong, why does not array return?
Answer 1, Authority 100%
Return in both cases the variable $ Exploded
, since the array_push
function changes the array specified in its parameters and returns the number of items after adding new.
Described in detail here http://php.net/manual/ru/function .Array-Push.php
Answer 2, Authority 50%
Array_Push does not work like this.
The first parameter you specify an array, in which elements transmitted by the second and then arguments will be inserted.
In your case, you need to do this:
if (! empty ($ DATA)) {
Array_Push ($ Exploded, $ DATA);
Return $ Exploded;
} ELSE ....