Does anyone can help a little bit to explain what this code is all about? I'm kinda confuse when it regards to array.
Thanks a lot guys.
Code: Select all
foreach ($item_array as $ia_key => $ia_value) {
$theitems = explode('->',$ia_key);
for($x = 0; $x < count($theitems); $x++) {
$item_name = $theitems[$x];
$item_total = $total_per_item[$item_name];
$in_float = $ia_value / $item_total;
$in_percent = round($in_float * 100, 2);
$alt_item = $theitems[ ($x + 1) % count($theitems)];
echo "[+] $ia_key($ia_value) / $item_name($item_total) = ". $in_float ."\r\n";