Quick newb question

I’m new to OO php…

In my .php file everything after -> is being printed when access object elements. Am i doing something wrong?

example;
<h1>
<?php
echo $sxml->title;
?>
</h1>

->title; ?> ends up getting printed instead of title’s value…

Have you instantiated the class/created the object earlier in the script?

$sxml = new ClassNameHere($any_arguments_here);

Yeah
$sxml = simplexml_load_file($feedURL);

simplexml is now a function of php isn’t it?

-> seems to be closing any previous html tag

Add the following snippet of code before $sxml = simplexml_load_file($feedURL); to ensure the file exists

if (!file_exists($feedURL)) {
    die('The file requested does not exist on the server!');
}

it was instantiated and test isn’t a method but I believe the issue is the lack of the zend framework on the server i’m working on… yikes what a pain

I assumed that php would return an error rather than just handing the > over to html without a proper php closing tag

oh well, thanks for trying to help me though