Although i have customized another 20% on the above code it worked like a charm.

Thanks

Regards,
nani

nani_nisha06

11-12-2012, 04:53 PM

Firepages,

Although i have customized another 20% on the above code it worked like a charm.

Thanks

Regards,
nani

But i am worried about the notice it still displaying with the expected output?

Notice: Undefined variable: item in C:\xampp\htdocs\MYM\index.php on line 41

Fou-Lu

11-12-2012, 07:17 PM

But i am worried about the notice it still displaying with the expected output?

Notice: Undefined variable: item in C:\xampp\htdocs\MYM\index.php on line 41

Is 'item' related to either of these property names?
Looks to me that it won't have anything to do with this block of code. This is part of the joy when it comes to using unknown data with things that should be hard coded structures (such as SQL). You simply need to use isset checks to see if it exists before attempting to read from the array (whichever this error represents).

nani_nisha06

11-13-2012, 09:07 AM

Is 'item' related to either of these property names?
Looks to me that it won't have anything to do with this block of code. This is part of the joy when it comes to using unknown data with things that should be hard coded structures (such as SQL). You simply need to use isset checks to see if it exists before attempting to read from the array (whichever this error represents).

Thanks Fou-Lu,

Now I have closed this issue by declaring null to the item variable...

Regards,
Nani

alemcherry

11-13-2012, 12:59 PM

Turning off PHP notice is fine. These are not really errors and you are likely to have a few of them unless you are very careful and correct.

This should help:
error_reporting(E_ALL ^ E_NOTICE);

http://php.net/manual/en/function.error-reporting.php

nani_nisha06

11-13-2012, 05:01 PM

Turning off PHP notice is fine. These are not really errors and you are likely to have a few of them unless you are very careful and correct.