undefined offset help


Posted on 16th Feb 2014 07:03 pm by admin

Hi All,

I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = array();
$i=0;
while($row = mysql_fetch_array($result))
{
$va[$i] = $row['id'];
$i++;
}
It gives undefined offset at this line $++

thanks

No comments posted yet

Your Answer:

Login to answer
67 Like 52 Dislike
Previous forums Next forums
Other forums

Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....

Warning: session_start() [fu

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

Help with captcha script needed
Hello,

I am working on a script where reCAPTCHA or a similar form of CAPTCHA will be used, f

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

why does my session end?
my connect.php starts the session just so you know
i can navigate arround my site fine except whe

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

Custom list order
Hi there,

I have checked this tutorial and it's great till the point where I want to display

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