0

i m getting this Notice this following code.. please help me why this error is comming...

$dataArr[$m]['longitude']= @$pageListArray['longitude']['value'];
$dataArr[$m]['lattitude']= @$pageListArray['lattitude']['value'];
$dataArr[$m]['hospitalType']= @$pageListArray['hospitalType']['value'];

foreach ($dataArr as $key => $row) {
        $order_in_category[$key]  = $row[0];//[0] is $order_in_category
    }

thanks in advance.. i hope i got solution here.

4
Contributors
4
Replies
8
Views
5 Years
Discussion Span
Last Post by ko ko
0

remove the "@" sign. it ignores error message in your code that's why you got 0 error message.

case close. :D

0

its not related @ sign.. i think @ sign is used to suppress notices and warning.. and that notice is coming in for loop.

0

You are using $row[0] but 0 has not been set, you should be using $row['value'] .

Edited by pritaeas: n/a

0

Absolutely, $row is an associative array, not numeric. It has value same with $pageListArray. So, the index must be string, not number. 'longtitude', 'lattitude', 'hospitalType', or 'value', as pointed by @pritaeas.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.