WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Forex Trading Online forex trading platform
Get status of specified document

tidy_get_status

(PHP 5, PECL tidy:0.5.2-1.2)

tidy_get_statusGet status of specified document

Description

Procedural style:

int tidy_get_status ( tidy $object )

Object oriented style:

int tidy->getStatus ( void )

tidy_get_status() returns the status for the specified tidy object . It returns 0 if no error/warning was raised, 1 for warnings or accessibility errors, or 2 for errors.

Example #1 tidy_get_status() example

<?php
$html 
'<p>paragraph</i>';
$tidy tidy_parse_string($html);

$html2 '<bogus>test</bogus>';
$tidy2 tidy_parse_string($html2);

echo 
tidy_get_status($tidy); //1

echo tidy_get_status($tidy2); //2
?>