when xml is parsed by simplexml functions, its elements can be accessed as array. however the information is not persistent and cannot be saved in sessions. in order to save the xml data or any particular nodes in array format, data must be converted t… more »
Tags: array
php: merge multidimensional arrays
there are 2 standard php functions to merge arrays. array_merge() merged values from the top level key. array_merge_recursive() will show all values with the same key as array. to merge multi-dimensional arrays, with values in the latter arrays overwri… more »
php: joining arrays with numeric keys
i've been using array_merge() to join my array data. i noticed in certain scenarios, the numeric keys of the arrays are reordered. going through the document for array_merge(), note the following:Values in the input array with numeric keys will be re… more »