what is the PROBLEM with this CODE?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
raahatazim
Forum Newbie
Posts: 3
Joined: Sat Aug 04, 2007 1:17 pm

what is the PROBLEM with this CODE?

Post by raahatazim »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

<?php
$html = '
<html>
  <head>
    <title>test</title>
  </head>
  <body>
    <p>paragraph</p>
  </body>
</html>';

$tidy = tidy_parse_string($html);

$body = tidy_get_body($tidy);
echo $body->value;
?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

What's the problem? That you wrote it, and pretty much had no idea what you were doing. Read the documentation for... whatever it is that you are using, or give us an actual problem. No one is going to go through all the effort required to find the class you are working with and then debug your code for you.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Post by kaszu »

As i understand you took it from http://lv2.php.net/manual/en/function.tidy-get-body.php
Do you have this library installed and your php is > 5.0.0 ?
If yes, then that what superdezign aready said.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'm having a difficulty seeing what this thread has to do with phpdeveloper.org. Please explain.
raahatazim
Forum Newbie
Posts: 3
Joined: Sat Aug 04, 2007 1:17 pm

Post by raahatazim »

thanzzz for ur effort FEYD...........finding something other than the SOLUTION.
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

Post by toasty2 »

Being rude to other people (especially moderators) isn't the best idea...they're trying to tell you a some things:
1) You need to say what exactly your problem is and provide more code.
2) You posted in the wrong forum section.
Post Reply