Menu
Hi !
I am looking for an elegant way to mix arrays arrays.
I admit i am fairly proud to have found the hereunder script. Unfortunately,
it breaks the lines.
Thanx for your help !
[code=php]
array=[
[‘Bernard’,’Bernard’],
[‘Jean’,’Jean’],
[‘Jocelyne’,’Jocelyne’],
[‘Maud’,’Maud’],
[‘Rudolf’,’Rudolf’]
]
function aleate()
{
return Math.pow(-1, Math.round(2*Math.random()))
}
alert(array.sort(aleate))