Login   Register  
PHP Classes
elePHPant
Icontem

undefined index

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      XML 2 PHP and PHP 2 XML  >  All threads  >  undefined index  >  (Un) Subscribe thread alerts  
Subject:undefined index
Summary:undefined index 'value'
Messages:2
Author:Ivo Peters
Date:2005-09-06 09:09:31
Update:2005-09-09 08:22:13
 

  1. undefined index   Reply  
Picture of Ivo Peters
Ivo Peters
2005-09-06 09:09:31
pity of the undefined index:

Notice: Undefined index: value in /home/httpd/vhosts/xxxx/httpdocs/test/class_xmlparser.php on line 86

  2. Re: undefined index   Reply  
Picture of Marcus Vinícius
Marcus Vinícius
2005-09-09 08:22:13 - In reply to message 1 from Ivo Peters
replace these lines

$xml_value['value'] = trim($xml_value['value']);
$xml_value['value'] = htmlspecialchars($xml_value['value'], ENT_QUOTES);
$xml_value['value'] = str_replace("\r", "
", $xml_value['value']);
$xml_value['value'] = str_replace("\n", "
", $xml_value['value']);

by this


if (isset($xml_value['value'])) {
$xml_value['value'] = trim($xml_value['value']);
$xml_value['value'] = htmlspecialchars($xml_value['value'], ENT_QUOTES);
$xml_value['value'] = str_replace("\r", "
", $xml_value['value']);
$xml_value['value'] = str_replace("\n", "
", $xml_value['value']);
}