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

I apologise! It's a newbie to PHP feedback form problem!
Hi,

I am a total newbie to PHP. I am also a unemployed and need to get a job. So after 100% r

Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i

Best way to cross matching large datasets
Hi,

Im running a script where am I cross matching about 200 000 data sets with each other. Ea

PHP mail() returns true but doesn't work
First off I apologize if this is a newbie question, and I generally don't like asking questions that

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

Pipe email to PHP - get mail adress from MySQL - send?
Hi all,

this is the challenge:

1) Our faculty at the college where I'm employed includ

Finding digits in variable containing text, and IDing them
$romanstock = "http://www.remoteprice.com/data.asp?storeid=123&itemcode=456&typ

Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year change

Disable Scrollbar in TableControl
Hello everbody,

please can anybody help me - outherwise i'm going to become desperate :P<

array_diff weirdness
I'm using the following bit of code

$diff = array_diff($pids, $pidlist);
$diff = array_va

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