Pushing elements in multidimensional arrays - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pushing elements in multidimensional arrays (
/showthread.php?tid=305921)
Pushing elements in multidimensional arrays -
Thomas. - 24.12.2011
Hi,
I'm looking for a method to prepend elements to the beginning of a multidimensional array, equivalent to PHP's
array_unshift().
Does anyone have made a function for this already, or perhaps some tips on how this could be done efficiently?
Thanks in advance.
Re: Pushing elements in multidimensional arrays -
Thomas. - 24.12.2011
Could you further explain the linked list method?
I've read about it, but I'm not quite sure what it would look like in a practical example.