# Undefined function. Please Help!

**URL:** <https://forum.kirupa.com/t/undefined-function-please-help/271016>\
**Category:** programming\
**Created:** [September 17, 2008, 12:42pm UTC](https://forum.kirupa.com/t/undefined-function-please-help/271016 "2008-09-17T12:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wispas](https://avatars.discourse-cdn.com/v4/letter/w/9de0a6/32.png) [@wispas](https://forum.kirupa.com/u/wispas)\
**Post date:** [September 17, 2008, 12:42pm UTC](https://forum.kirupa.com/t/undefined-function-please-help/271016/1 "2008-09-17T12:42:10Z")

</div>

Can someone please help me with this error I keep getting.

Fatal error: Call to undefined function: simplexml\_load\_file() in /homepages/25/d220261013/htdocs/tester/blog.php on line 7

**blog.php**

\<?php

// define the url that will return the xml  
$xml\_url = ‘articles.xml’;

// use this function to store the xml tree in a variable  
$sxml = simplexml\_load\_file($xml\_url);

// print the content of $sxml  
// print\_r($sxml);

// if you want to get particular values of the xml tree, use a loop  
foreach($sxml-\>article as $key=\>$value)  
{  
echo ‘\<img src="’.$value[‘arts’].’" alt="" /\>’;  
echo ‘\<p /\>’;  
echo $value[‘titles’];  
echo ‘\<br /\>’;  
echo $value[‘dates’];  
echo ‘\<p /\>’;  
echo $value[‘descriptions’];  
echo ‘\<br /\>’;  
echo ‘\<hr /\>’;  
echo ‘\<br /\>’;  
}  
?\>

**articles.xml**

\<?xml version=“1.0” encoding=“utf-8”?\>  
\<Total\_articles\>

\<article titles=“LJH Interior Design” dates=“July 2008” descriptions=“I have been commissioned by a new client, interior designer Lorna J Higgins, to shoot her latest project. For this large family home in Surrey, Lorna has designed the living room, dining room, family room, master bedroom and the entrance hall.” arts=“blog\_art/080701.jpg” /\>

\</Total\_articles\>
