Php Unique Items In Array Javascript Function Definition In Algebra