Home  >  Article  >  Backend Development  >  PHP Chinese function serialization_PHP tutorial

PHP Chinese function serialization_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:00:14951browse

Function Abs()

Description:

mixed abs (mixed number);

Returns the absolute value of number. If the argument number is float, return type is also float, otherwise it is int (returns the absolute value of the entered number, floating point type returns floating point type, other returns integer type)

Function Acos()

Description:

float acos (float arg);

Returns the arc cosine of arg in radians (returns the cosine of the angle)
Adabas D Function
Function ada_afetch()
Description:
fetch a result row into an array(return the result into an array)
Function ada_autocommit()
Description:
toggle autocommit behavior

Function ada_close()
Description:
close a connection to an Adabas D server (close a database connection)

Function ada_commit()
Description:
commit a transaction (submit a transaction)

Function ada_connect()
Description:
connect to an Adabas D datasource(connect a database)
Function ada_exec()
Description:
prepare and execute a SQL statement(execute a SQL statement)
Function ada_fetchrow()
Description:
fetch a row from a result(fetch a record from the database)

Function ada_fieldname()
Description:
get the columnname(get field name)
Function ada_fieldnum()
Description:
get column number (get the total number of fields)

Function ada_fieldtype()
Description:
get the datatype of a field(get the type of field)

Function ada_freeresult()
Description:
free resources associated with a result

Function count()
Description:
Count the number of elements in a variable
int count (mixed var);
Returns the number of elements in var , which is typically an array (since anything else will have one element).
Returns 0 if the variable is not set.
Returns 1 if the variable is not an array.



Function current()
Description:
Returns the element currently pointed to by the array pointer



mixed current (array array);



Each array variable has an internal pointer that points to one of its elements. In addition, all of the elements in the array are linked by a bidirectional linked list for traversing purposes. The internal pointer points to the first element that was inserted to the array until you run one of the functions that modify that pointer on that array.



The current() function simply returns the array element that's currently being pointed by the internal pointer. It does not move the pointer in any way. If the internal pointer points beyond the end of the elements list, current() returns false.



Function each()
Description:
Returns the value of the next key/value pair in the array



array each (array array);



Returns the current key/value pair from the array array and advances the array cursor. This pair is returned in a four-element array, with the keys 0 , 1 , key , and value . Elements 0 and key each contain the key name of the array element, and 1 and value contain the data.



Example 1. each() examples



$foo = array( "bob", "fred", "jussi", "jouni" ); $bar = each( $foo );
$bar now contains the following key/value pairs:



0 => 0
1 => 'bob'
key => 0
value => 'bob'



$foo = array( "Robert" => "Bob", "Seppo" => "Sepi" ); $bar = each( $foo );



$bar now contains the following key/value pairs:



0 => 'Robert'
1 => 'Bob'
key => 'Robert'
value => 'Bob'



Example 2. Traversing $HTTP_POST_VARS with each()


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445545.htmlTechArticleFunction Abs() Description: mixed abs (mixed number); Returns the absolute value of number. If the argument number is float, return type is also float, otherwise it is int(returns the number lost...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn