hi i have php file that reads the data from three table of mysql in xml now i want to call the xml data on this page into another page.
how should i do this
how should i do this
$input = file_get_contents("recipe_xml.php");
$xml = new SimpleXMLElement($input);
$recipe=$xml.recipe;
$rec_id=$xml.rec_id;
echo $recipe;
echo $rec_id;
Warning: SimpleXMLElement::__construct(): Entity: line 100: parser error : Start tag expected, '<' not found in /var/www/cafe/view/update_xml.php on line 10 Call Stack: 0.0005 319164 1. {main}() /var/www/cafe/view/update_xml.php:0 0.0009 322784 2. SimpleXMLElement->__construct() /var/www/cafe/view/update_xml.php:10 Warning: SimpleXMLElement::__construct(): ?> in /var/www/cafe/view/update_xml.php on line 10 Call Stack: 0.0005 319164 1. {main}() /var/www/cafe/view/update_xml.php:0 0.0009 322784 2. SimpleXMLElement->__construct() /var/www/cafe/view/update_xml.php:10 Warning: SimpleXMLElement::__construct(): ^ in /var/www/cafe/view/update_xml.php on line 10 Call Stack: 0.0005 319164 1. {main}() /var/www/cafe/view/update_xml.php:0 0.0009 322784 2. SimpleXMLElement->__construct() /var/www/cafe/view/update_xml.php:10 Exception: String could not be parsed as XML in /var/www/cafe/view/update_xml.php on line 10 Call Stack: 0.0005 319164 1. {main}() /var/www/cafe/view/update_xml.php:0 0.0009 322784 2. SimpleXMLElement->__construct() /var/www/cafe/view/update_xml.php:10
Comment