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

PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying

Gaining access to Drop Down Menu Variable
code is below, I am creating a drop down menu. I want to echo the value selected in the drop down me

mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$u

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

how to remove in php string display
My code is $message="We're looking at developing our website."; $body= "My mess

Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files.

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempt

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