Skip to content

setHTML

Ayoob edited this page Apr 11, 2020 · 2 revisions

setHTML

[easySQLite3 >= v0.1.0 (Beta)]

Change the output new line to <br> instead of \n.

Description

setHTML( boolean $html ) : boolean

Changing the output new line to HTML format <br> instead of \n.

This will work only for the output text by the class when the verbose level is 2 or above.

Note: this doesn't effect lastMessage() function.

Parameters

Parameter Description
html Setting this parameter to true will output <br>, and false will output \n .

Return Values

The function should return a boolean representing the html output you set. It should be the same value as $html unless it couldn't update the variable.

Examples

Example #1 : Set output as HTML

include "easySQLite3.class.php";

$db = new easySQLite3("database.sqlite");

$db->setVerbose(2);

$db->setHTML( true );

$db->connect("database.sqlite");

This will output:

[Connect]: Database already connected.
<br>

Example #2 : Set output as plain-text

include "easySQLite3.class.php";

$db = new easySQLite3("database.sqlite");

$db->setVerbose(2);

$db->setHTML( false );

$db->connect("database.sqlite");

This will output:

[Connect]: Database already connected.

Notes

Related Functions

  • setVerbose - Set the verbose level of the class.
  • getVerbose - Get the current verbose level of the class.
  • getMessage - Returns the last message that was set by the class.

Back to Functions list

Clone this wiki locally