Javascript Get Array Index Of Element In String Php W3schools