I need to convert septets to octest like this c example:
private void septetToOctet()
{
int len = 1;
int j = 0;
int septetcount = septet.Count;
while (j < septet.Count - 1)
{
string tmp = septet[j]; // storing jth value
string tmp1 = septet[j + 1]; //storing j+1 th value
string mid = SWAP(tmp1);
tmp1 = mid;
tmp1 = tmp1.Substring(0, len);
string add = SWAP(tmp1);
tmp = add + tmp;// +"-";
tmp = tmp.Substring(0, 8);
//txtoctet.Text += tmp + " || ";
octet.Add(tmp);
len++;
if (len == 8)
{
len = 1;
j = j + 1;
}
j = j + 1;
}
}
..only problem is - i need to do it in php. Does anybody have an code example for this ?