![]() |
Altering array data
I have a multi array like
PHP Code:
PHP Code:
|
Anything but objects are passed through value instead of reference in PHP. That's why you can't do what you try to. A workaround would be:
PHP Code:
|
Thanks for the reply. I had played around with that but doesn't that mean I would have to name each item in the array, something like this
PHP Code:
|
You mean something like:
PHP Code:
|
Yes, that does it. My thanks to both of you for your help. It is appreciated. :)
|
You can also make sure that the array items are passed by reference (rather than by value as default) when iterating through the foreach blocks.
PHP Code:
|
| All times are GMT. The time now is 05:20 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0