Hey. How to change the behavior of the standard PHP method for working with arrays and objects, how to add a new standard method? Something like this in js
Array.prototype.indexOf = function (vItem) { for (var i=0; i < this.length; i++) { if (vItem == this[i]) { return i; } } return -1; } var aColors = new Array("red", "green", "yellow"); alert(aColors.indexOf("green"));