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?

Did you know?Explore Trending and Topic pages for more stories like this.
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

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

Simple image grab script.
I was wondering if it was possible and if anyone knew how to make a simple php script that looks at

Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages

Need help to identify this error please
:confused:Can anyone help me tell what this error message means? Maybe tell me where to look to fix

FILTER_CALLBACK -- Files?
Hi All,

I'm using the php filter functions to validate my form data. For custom filters, I'm

Regular expression tips or resources
Hello! I'm having some issues implementing the appropriate regex patter to eliminate unwanted charac

Strange cookie problem. setcookie dependant on where user was directed from?
Hello,

I have a website that sets a cookie when a user visits the website. The cookie holds a

Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se

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