Is there something wrong?

Posted on 16th Feb 2014 by admin

Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

Code: $j = 1;
$vals = array();
$feedline = array();
foreach(explode($delimiter,$b) as $key => $values) {

if($j == $appsubcol2 || $j == $appsubcol3 || $j == $appsubcol4) {
$x = 1;
if(!empty($delimet2) && $j == $appsubcol2) {$del = $sdelimiter; $sdel = $sdel2; }
if(!empty($delimet3) && $j == $appsubcol3) {$del = $ssdelimiter; $sdel = $sdel3; }
if(!empty($delimet4) && $j == $appsubcol4) {$del = $sssdelimiter; $sdel = $sdel4; }

$subcount = count(explode($del,$values));
foreach(explode($del,$values) as $subdel) {
if($sdel[$x] == 1) {
$feedline[$j] = $subdel;
$j++;
} $x++;

}} else { $feedline[$j] = $values;
$j++; }

}The first itteration of the three if statments works great... when it gets to the second and third if statement, they don't explode....

Other forums