ive got my xml file and also heres my php script
$db = simplexml_load_file("BIN/videos.xml");
$id = $_GET['id'];
$tq = "//video['@id=" . $id . "']/title[0]";
$dq = "//video['@id=" . $id . "']/description[1]";
$eq = "//video['@id=" . $id . "']/embed[2]";
$title = $db->xpath($tq);
$description = $db->xpath($dq);
$embed = $db->xpath($eq);
include("design/lyt.php");
echo $embed . '<br>
<h1>' . $title . '</h1>
<p>' . $description . '</p>';
?>
Its supposed to display "Test" for them all! but it says "Array"
Access the elements of the
array
returned fromxpath
...PHP >= 5.4:
PHP < 5.4:
Update PHP :-)
or
or