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

Will an XHTML DOCTYPE interfere with my PHP if I'm not experienced enough?
I've read this article here: http://friendlybit.com/html/why-xhtml-is-a-bad-idea/

In a nutshe

update the selected existing records of database
Hi frndz,
I am new to php and get stuck....

Edit.php > Update.php > Updatea

Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in t

I got my hosting suspended XD
So I saw this challenge a day or so ago

http://www.programming-challenges.com/pg.php?page=dow

Create PHP table grid help, please
I have a MySQL database setup, now it's time for the table (gridview) design in php. Here's the prob

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

The type or namespace name 'ServiceModel' does not exist in the namespace 'System'
When I locally run the website, it works just fine, but when I uploaded it to the hosting environmen

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

Tree Menu
Hi guys,

Can anyone help me making a tree navigation system? I have a site where I'm allowin

Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s

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