Quisiera pasar este código a php, ¿Alguien me puede ayudar?. He intentado de muchas maneras y no he conseguido hacerlo, agradezco mucho la ayuda :))
Dejo el código aquí:
Código:
function scoreboard(xmlPop) { this.xmlDir = 'http://www.marca.com/geca/'; this.tmpCODArray = xmlPop.split('_'); var tmpCOD = ''; var CP = 0; for (i = 0; i < tmpCODArray.length; ++i) { tmpCOD += tmpCODArray[i] + '/'; CP += Number(tmpCODArray[i]); } CP = (CP + Math.floor((Math.random()*5000)+1)).toString(16); xmlDir += tmpCOD; return xmlDir + 'POP_' + xmlPop + '.Xml'; }
¡Muchas gracias!