How to delete array element in function
View Single Post
03-31-2009, 06:41 PM
Join Date: Apr 2007
With regards to the original post, your use of
was incorrect. The correction would be
Originally Posted by
Well...that's not good. I don't know who told you this, but it's completely wrong. The reason is not found in the code, hower, but in the PHP engine itself.
The reason is found in the code, not the PHP engine. Passing the array by reference or value is not really the key point; the problem was accessing the correct structure in the
However, it would probably be more beneficial to start over and work with a reference to the array within the function as it would alleviate the need to have the global variable always named
The warnings about call-time pass-by-reference being deprecated are only raised when you try to pass an argument as a reference when
a function (e.g.
$blah = myfunc(&$array)
) and not when defining a function as accepting arguments by reference (e.g.
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe