Is there something wrong?


Posted on 16th Feb 2014 07:03 pm 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....

No comments posted yet

Your Answer:

Login to answer
208 Like 31 Dislike
Previous forums Next forums
Other forums

Help with some dates
I have a list of dates in an array:

$mondays = array(
strtotime("October 12, 2009

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

having a small php error tha deals with the 'foreach'
Last night i was working on a script for a cart and it seemed to working good, until this morning. F

Just cannot get 'area' to submit to db using same php code as already used
Basically all i have done is just modified some code and added an area section.
The form is allre

MS Access data into a html table
Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
f

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash