PHP mysqli_stmt_init() Function

The mysqli_stmt_init() function initializes a statement and returns an object suitable for mysqli_stmt_prepare().

Object oriented style

mysqli_stmt mysqli::stmt_init ( void )

Procedural style

mysqli_stmt mysqli_stmt_init ( mysqli $link )

Allocates and initializes a statement object suitable for mysqli_stmt_prepare().

Example -

Initialize a statement and return an object to use with mysqli_stmt_prepare():

ParameterDescription
linkProcedural style only: A link identifier returned by mysqli_connect() or mysqli_init()

Returns an object.