# AS to PHP translation of algorithm

**URL:** <https://forum.kirupa.com/t/as-to-php-translation-of-algorithm/202076>\
**Category:** flash\
**Created:** [September 27, 2006, 3:07pm UTC](https://forum.kirupa.com/t/as-to-php-translation-of-algorithm/202076 "2006-09-27T15:07:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Breen](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Breen](https://forum.kirupa.com/u/Breen)\
**Post date:** [September 27, 2006, 3:07pm UTC](https://forum.kirupa.com/t/as-to-php-translation-of-algorithm/202076/1 "2006-09-27T15:07:18Z")

</div>

Didn’t really know where to post this, so i’ll start here. I have an algorithm that I used in a project, but I now need the same thing in php and I have no idea how to do it. Do any of you flash/php developers have any idea? thanks 😊  
[AS] for (i=0; i\<retArr.length; i++) {  
var pk:String = retArr\*;  
if (this[“order”+pk] == undefined) {  
this[“order”+pk] = new Array();  
this[“order”+pk].push(retArr\*);  
orderArr.push(pk);  
} else {  
this[“order”+pk].push(retArr\*);  
}  
}[/AS]

It might seem unlogic but I simplified some of the code, because it was irrelevant.
