Thread: Script Help.
View Single Post
  #2  
Old 02-28-2015, 05:21 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
array.delete mutates the array, it doesn't return a new one. So:

PHP Code:
      echo("Remove:" SPC temp.test[n]); 
      echo(
"From:" SPC temp.test);
      
temp.test.delete(n);
      echo(
"New Array:" SPC temp.test); 
will probably work. You might also find array.remove(element) useful, which removes the first instance of an element in an array (meaning you don't have to iterate to find the index).

edit: on a related note, beware SQL injection in that query if you're not already escaping those values.
__________________

Last edited by cbk1994; 02-28-2015 at 09:15 PM..
Reply With Quote