I feel like I'm going crazy. I need to take a string of text from an xml file, and define it as a PHP variable and output it into an HTML page. I can't figure out why this wont work. Any ideas??
I have this xml document (people.xml):
<?xml version="1.0"?> <datas> <person> <people> <owner>Joe Blow</owner> </people> </person> </datas> This PHP (db.php):
<?php $xml = simplexml_load_file('people.xml') or die("Error: Can't load people"); $xml->person->people->owner = $owner; ?> This HTML(index.php):
<?php include 'db.php';?> <label for="owner-1"><?php echo $owner ?></label>