GetDotted Domains

Viewing Thread:
"Please help! XML & PHP"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 02/06/02 at 19:21
Regular
Posts: 787
OK, imagine I have a simple .xml file with the following extract:

...

Home Page
Main home page


About Me
All about me

...
----------------

If I wanted to use PHP to extract the info for the Home Page, and display it on the page, how would I do it? I have read through lots of stuff about PHP and XML, but I can't work out how to print only a certain entry. For example, how would I get a page to contain the following code???:


Hello

Main Home Page

Mon 03/06/02 at 08:10
Posts: 0
Nimco wrote:
> for ($i=0; $i=3; $i++)

it's alright, ive got it, the for statement is wrong. i changed it and it all worked....
Sun 02/06/02 at 22:10
Posts: 0
any ideas anyone? i tried using this script, but it doesnt work - it times out....

-----------

$simple = "simple notecomplex note";
$p = xml_parser_create();
xml_parse_into_struct($p,$simple,$vals,$index);
xml_parser_free($p);
echo "Index array\n";
print_r($index);
echo "\nVals array\n";
print_r($vals);

for ($i=0; $i=3; $i++)
{
$val_id[$i] = $vals[$i][attributes][ID];
if (strstr($val_id[$i], "home"))
{
$data = $vals[$i][value];
}
}

echo $data;

?>

------------------

any ideas why it times out??? error on line 13 apparently...
Sun 02/06/02 at 19:21
Posts: 0
OK, imagine I have a simple .xml file with the following extract:

...

Home Page
Main home page


About Me
All about me

...
----------------

If I wanted to use PHP to extract the info for the Home Page, and display it on the page, how would I do it? I have read through lots of stuff about PHP and XML, but I can't work out how to print only a certain entry. For example, how would I get a page to contain the following code???:


Hello

Main Home Page

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con
I've been with Freeola for 14 years...
I've been with Freeola for 14 years now, and in that time you have proven time and time again to be a top-ranking internet service provider and unbeatable hosting service. Thank you.
Anthony

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.