Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tidy_setopt(3) [php man page]

TIDY_SETOPT(3)								 1							    TIDY_SETOPT(3)

tidy_setopt - Updates the configuration settings for the specified tidy document

SYNOPSIS
bool tidy_setopt (string $option, mixed $value) DESCRIPTION
tidy_setopt(3) updates the specified $option with a new $value. PARAMETERS
o $option - The tidy option name. A list of available configuration options may be found at: http://tidy.sourceforge.net/docs/quickref.html. o $value - The tidy option name. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 tidy_setopt(3) example <?php $html = '<p>test</i>'; $tidy = tidy_parse_string($html); tidy_setopt('indent', FALSE); ?> NOTES
Note This function is only available in Tidy 1.0. It became obsolete in Tidy 2.0, and thus has been removed. SEE ALSO
tidy_getopt(3), tidy_get_config(3), tidy_reset_config(3), tidy_save_config(3). PHP Documentation Group TIDY_SETOPT(3)

Check Out this Related Man Page

TIDY_PARSE_STRING(3)							 1						      TIDY_PARSE_STRING(3)

tidy::parseString - Parse a document stored in a string

       Object oriented style

SYNOPSIS
bool tidy::parseString (string $input, [mixed $config], [string $encoding]) DESCRIPTION
Procedural style tidy tidy_parse_string (string $input, [mixed $config], [string $encoding]) Parses a document stored in a string. PARAMETERS
o $input - The data to be parsed. o $config - The config $config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. For an explanation about each option, visit http://tidy.sourceforge.net/docs/quickref.html. o $encoding - The $encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis. RETURN VALUES
Returns a new tidy instance. EXAMPLES
Example #1 tidy_parse_string(3) example <?php ob_start(); ?> <html> <head> <title>test</title> </head> <body> <p>error<br>another line</i> </body> </html> <?php $buffer = ob_get_clean(); $config = array('indent' => TRUE, 'output-xhtml' => TRUE, 'wrap' => 200); $tidy = tidy_parse_string($buffer, $config, 'UTF8'); $tidy->cleanRepair(); echo $tidy; ?> The above example will output: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> test </title> </head> <body> <p> error<br /> another line </p> </body> </html> NOTES
Note The optional parameters $config and $encoding were added in Tidy 2.0. SEE ALSO
tidy.parseFile(3), tidy.repairFile(3), tidy.repairString(3). PHP Documentation Group TIDY_PARSE_STRING(3)
Man Page

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

passing variable to function

Hi, I am trying to sum up numbered columns and in order to tidy up the program I have wrote a function to do the adding of some numbers. I have a problem though with passing a variable to the function in the UNIX bash shell. The function only gives the first number in the variable list and does... (4 Replies)
Discussion started by: Knotty
4 Replies

2. Shell Programming and Scripting

Tidy shell script source file

Hi all, Is there a tool to tidy up shell script source file and reformat it. Preferably I am looking for a perfect tool to do this. Also I have heard it is possible to do with emacs editor but unfortunately it is looking very different and new from vi. Emacs is new to me and I could not find... (1 Reply)
Discussion started by: meharo
1 Replies

3. UNIX for Dummies Questions & Answers

Permission denied problem

I am trying to tidy our server and write cron to keep it tidy. We took on a third party to do some work last year. They were given their own UID/pwd so that they would have limited access. Part of what they wrote created an archive file at the end of every day. A year on and we don't want... (1 Reply)
Discussion started by: RexJacobus
1 Replies