mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Corrections to settype():
o] The return type is boolen o] The first param is type of mixed o] Missing boolean type from the list o] Added two examples git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@45653 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8902d6c4af
commit
021177a6c5
1 changed files with 15 additions and 2 deletions
|
@ -903,8 +903,8 @@ if (!odbc_execute ($stmt, &$sqldata)) {
|
|||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>settype</function></funcdef>
|
||||
<paramdef>string <parameter>var</parameter></paramdef>
|
||||
<funcdef>boolean <function>settype</function></funcdef>
|
||||
<paramdef>mixed <parameter>var</parameter></paramdef>
|
||||
<paramdef>string <parameter>type</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
|
@ -915,6 +915,7 @@ if (!odbc_execute ($stmt, &$sqldata)) {
|
|||
<para>
|
||||
Possibles values of <parameter>type</parameter> are:
|
||||
<itemizedlist>
|
||||
<listitem><simpara>"boolean"</simpara></listitem>
|
||||
<listitem><simpara>"integer"</simpara></listitem>
|
||||
<listitem><simpara>"double"</simpara></listitem>
|
||||
<listitem><simpara>"string"</simpara></listitem>
|
||||
|
@ -925,6 +926,18 @@ if (!odbc_execute ($stmt, &$sqldata)) {
|
|||
<para>
|
||||
Returns true if successful; otherwise returns false.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>settype</function> example</title>
|
||||
<programlisting role="php">
|
||||
$foo = "5bar"; // string
|
||||
$bar = true; // boolean
|
||||
|
||||
settype($foo, "integer"); // $foo is now 5 (integer)
|
||||
settype($bar, "string"); // $bar is now "1" (string)
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>gettype</function>.
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue