
PHP Funktionen : PHP Übersicht : PHP Manual
is_array
PHP
Function is_array / PHP
Funktion is_array
phplist »
Webkatalog Script - Link Script »
PHP Function Coder »
is_array
- PHP Funktion
- is_array ( phplist Code 100% Relevanz )
- Rubrik
- Funktionen zur Behandlung von Variablen
- Kurzform
- is_array -- Prüft ob die Variable ein Array ist
- Vorschau
- ...is_array is_array (PHP 3, PHP 4, PHP 5) is_array -- Prüft, ob die Variable ein Array ist Beschreibung bool is_array ( mixed var ) Ermittelt, ob die gegebene Variable ein Array ist. Parameter Liste var Die zu untersuchende Variable. Rückgabewerte Gibt TRUE , wenn var vom Typ array ist, andernfalls FALSE . Beispiele Beispiel 1. Ü...
- PHP Manual
- [ is_array php.net ]
- PHP Funktion
- call_user_func_array ( phplist Code 50% Relevanz )
- Rubrik
- Function Handling functions
- Kurzform
- call_user_func_array -- Call a user function given with an array of parameters
- Vorschau
- ... function given by function , with the parameters in param_arr . For example: Beispiel 1. call_user_func_array() example <?php function debug ( $var , $val ) { echo "***DEBUGGING \n VARIABLE: $var \n VALUE:" ; if ( is_array ( $val ) || is_object ( $val ) || is_resource ( $val )) { print_r ( $val ); } else { echo " \n $val \n " ; } echo "***\n" ; } $c = mysql_connect (); $host = $_SERVER [ "SERVER_NAME" ]; call_user_func_array ( 'debug' , ...
- PHP Manual
- [ call_user_func_array php.net ]
- PHP Funktion
- is_bool ( phplist Code 40% Relevanz )
- Rubrik
- Funktionen zur Behandlung von Variablen
- Kurzform
- is_bool -- Prüft ob eine Variable vom Typ boolean ist
- Vorschau
- ...a )) { echo "Ja, das ist ein Boolean" ; } // Da $b kein Boolean ist, ergibt der Ausdruck nicht true if ( is_bool ( $b )) { echo "Ja, das ist ein Boolean" ; } ?> Siehe auch is_float() is_int() is_string() is_object() is_array() is_array is_callable...
- PHP Manual
- [ is_bool php.net ]
- PHP Funktion
- set_error_handler ( phplist Code 40% Relevanz )
- Rubrik
- Error Handling and Logging Functions
- Kurzform
- set_error_handler -- Bestimmt eine benutzerdefinierte Funktion zur Fehlerbehandlung.
- Vorschau
- ... zum Test der Fehlerbehandlung function scale_by_log ( $vect , $scale ) { if (! is_numeric ( $scale ) || $scale <= 0 ) { trigger_error ( "log(x) for x <= 0 is undefined, you used: scale = $scale" , FATAL ); } if (! is_array ( $vect )) { trigger_error ( "Incorrect input vector, array of values expected" , ERROR ); return null ; } for ( $i = 0 ; $i < count ( $vect ); $i ++) { if (! is_numeric ( $vect [ $i ])) trigger_error ( "Value at ...
- PHP Manual
- [ set_error_handler php.net ]
- PHP Funktion
- unserialize ( phplist Code 32% Relevanz )
- Rubrik
- Funktionen zur Behandlung von Variablen
- Kurzform
- unserialize -- Erzeugt aus einem gespeicherten Datenformat einen Wert in PHP
- Vorschau
- ... )) { // wenn execute oder fetch fehlschlägt, initialisiere ein leeres Array $session_data = array(); } else { // die serialisierten Daten sollten nun in $tmp[0] stehen. $session_data = unserialize ( $tmp [ 0 ]); if (! is_array ( $session_data )) { // etwas ging schief, also wieder ein leeres Array initialisieren $session_data = array(); } } ?> Siehe auch serialize() . strval unset...
- PHP Manual
- [ unserialize php.net ]
- PHP Funktion
- imap_get_quotaroot ( phplist Code 31% Relevanz )
- Rubrik
- IMAP POP3 und NNTP Funktionen
- Kurzform
- imap_get_quotaroot -- Retrieve the quota settings per user
- Vorschau
- ...() example <?php $mbox = imap_open ( "{imap.example.org}" , "kalowsky" , "password" , OP_HALFOPEN ) or die( "can't connect: " . imap_last_error ()); $quota = imap_get_quotaroot ( $mbox , "INBOX" ); if ( is_array ( $quota )) { $storage = $quota_values [ 'STORAGE' ]; echo "STORAGE usage level is: " . $storage [ 'usage' ]; echo "STORAGE limit level is: " . $storage [ 'limit' ]; $message = $quota_values [ 'MESSAGE' ]; echo "MESSAGE ...
- PHP Manual
- [ imap_get_quotaroot php.net ]
- PHP Funktion
- imap_rfc822_parse_adrlist ( phplist Code 30% Relevanz )
- Rubrik
- IMAP POP3 und NNTP Funktionen
- Kurzform
- imap_rfc822_parse_adrlist -- Parsen eines Adress-Strings
- Vorschau
- ...imap_rfc822_parse_adrlist() Beispiel $address_string = "Hartmut Holzgraefe <hartmut@php.net>, postmaster@somedomain.net, root"; $address_array = imap_rfc822_parse_adrlist ($address_string, "somedomain.net"); if (! is_array ($address_array)) die ("somethings wrong\n"); reset ($address_array); while (list( $key, $val) = each ($address_array)) { print "mailbox : " . $val->mailbox . "<br>\n"; print "host : " . $val->host . "<br&...
- PHP Manual
- [ imap_rfc822_parse_adrlist php.net ]
- PHP Funktion
- pg_meta_data ( phplist Code 30% Relevanz )
- Rubrik
- PostgreSQL Funktionen
- Kurzform
- pg_meta_data -- Gibt Metadaten einer Tabelle als Array zurück
- Vorschau
- ... auftrat. Beispiele Beispiel 1. Metadaten für eine Tabelle ermitteln <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Verbindungsaufbau fehlgeschlagen" ); $meta = pg_meta_data ( $dbconn , 'authors' ); if ( is_array ( $meta )) { echo '<pre>' ; var_dump ( $meta ); echo '</pre>' ; } ?> Das oben gezeigte Beispiel erzeugt folgendeAusgabe: array(3) {["author"]=>array(5) { ["num"]=> int(1) ["type"]=> string(7) "...
- PHP Manual
- [ pg_meta_data php.net ]
- PHP Funktion
- stripslashes ( phplist Code 30% Relevanz )
- Rubrik
- String-Funktionen
- Kurzform
- stripslashes -- Entfernt Quotes aus einem mittels addslashes() gequoteten String
- Vorschau
- ... Funktion auf ein mehrdimensionales Array anwenden wollen, müssen Sie eine rekursive Funktion verwenden. Beispiel 2. Verwendung von stripslashes() in einem Array <?php function stripslashes_deep ( $value ) { $value = is_array ( $value ) ? array_map ( 'stripslashes_deep' , $value ) : stripslashes ( $value ); return $value ; } // Beispiel $array = array( "f\\'oo" , "b\\'ar" , array( "fo\\'o" , "b\\'ar" )); $array = stripslashes_deep ( $array...
- PHP Manual
- [ stripslashes php.net ]
- PHP Funktion
- ifx_fetch_row ( phplist Code 29% Relevanz )
- Rubrik
- Informix Funktionen
- Kurzform
- ifx_fetch_row -- Holt eine Zeile als assoziatives Array
- Vorschau
- ... Zeilen in der Ergebnismenge (%d)\n<br />" , $rowcount ); die ( "Bitte begrenzen Sie Ihre Abfrage<br />\n" ); } if (! ifx_do ( $rid )) { /* ... Fehler ... */ } $row = ifx_fetch_row ( $rid , "NEXT" ); while ( is_array ( $row )) { for( reset ( $row ); $fieldname = key ( $row ); next ( $row )) { $fieldvalue = $row [ $fieldname ]; printf ( "%s = %s," , $fieldname , $fieldvalue ); } printf ( "\n<br />" ); $row = ifx_fetch_row ( $rid...
- PHP Manual
- [ ifx_fetch_row php.net ]
- PHP Funktion
- intval ( phplist Code 29% Relevanz )
- Rubrik
- Funktionen zur Behandlung von Variablen
- Kurzform
- intval -- Konvertiert einen Wert nach integer
- Vorschau
- ...keinerlei Auswirkung, wenn der var -Parameter kein String ist. Siehe auch floatval() strval() settype() is_numeric() Typen-Tricks BCMath - Mathematische Funktionen mit beliebiger Genauigkeit import_request_variables is_array...
- PHP Manual
- [ intval php.net ]
- PHP Funktion
- imap_get_quota ( phplist Code 27% Relevanz )
- Rubrik
- IMAP POP3 und NNTP Funktionen
- Kurzform
- imap_get_quota -- Retrieve the quota level settings and usage statics per mailbox
- Vorschau
- ...() example <?php $mbox = imap_open ( "{imap.example.org}" , "mailadmin" , "password" , OP_HALFOPEN ) or die( "can't connect: " . imap_last_error ()); $quota_value = imap_get_quota ( $mbox , "user.kalowsky" ); if ( is_array ( $quota_value )) { echo "Usage level is: " . $quota_value [ 'usage' ]; echo "Limit level is: " . $quota_value [ 'limit' ]; } imap_close ( $mbox ); ?> As of PHP 4.3, the function more properly reflects the ...
- PHP Manual
- [ imap_get_quota php.net ]
- PHP Funktion
- time_nanosleep ( phplist Code 27% Relevanz )
- Rubrik
- Sonstige Funktionen
- Kurzform
- time_nanosleep -- Delay for a number of seconds and nanoseconds
- Vorschau
- ....\n" ; } // And this is the best: $nano = time_nanosleep ( 2 , 100000 ); if ( $nano === true ) { echo "Slept for 2 seconds, 100 milliseconds.\n" ; } elseif ( $nano === false ) { echo "Sleeping failed.\n" ; } elseif ( is_array ( $nano )) { $seconds = $nano [ 'seconds' ]; $nanoseconds = $nano [ 'nanoseconds' ]; echo "Interrupted by a signal.\n" ; echo "Time remaining: $seconds seconds, $nanoseconds nanoseconds." ; } ?> Anmerkung: Diese ...
- PHP Manual
- [ time_nanosleep php.net ]
- PHP Funktion
- Disabling Magic Quotes ( phplist Code 27% Relevanz )
- Rubrik
- Magic Quotes
- Kurzform
- -----
- Vorschau
- ... so it's preferred to instead set the appropriate directives elsewhere. Beispiel 31-2. Disabling magic quotes at runtime <?php if ( get_magic_quotes_gpc ()) { function stripslashes_deep ( $value ) { $value = is_array ( $value ) ? array_map ( 'stripslashes_deep' , $value ) : stripslashes ( $value ); return $value ; } $_POST = array_map ( 'stripslashes_deep' , $_POST ); $_GET = array_map ( 'stripslashes_deep' , $_GET ); $_COOKIE = ...
- PHP Manual
- [ Disabling Magic Quotes php.net ]
- PHP Funktion
- sesam_fetch_row ( phplist Code 26% Relevanz )
- Rubrik
- SESAM Datenbankfunktionen
- Kurzform
- sesam_fetch_row -- Lesen einer Zeile als Array
- Vorschau
- ... ( $name ). "'\n" . " ORDER BY FIRSTNAME" , 1 ); if (! $result ) { ... error ... } // print the table in backward order print "<TABLE BORDER>\n" ; $row = sesam_fetch_row ( $result , SESAM_SEEK_LAST ); while ( is_array ( $row )) { print " <TR>\n" ; for( $col = 0 ; $col < $row [ "count" ]; ++ $col ) { print " <TD>" . htmlspecialchars ( $row [ $col ]). "</TD>\n" ; } print " </TR>\n" ; // use implied ...
- PHP Manual
- [ sesam_fetch_row php.net ]
- PHP Funktion
- Objektiteration ( phplist Code 26% Relevanz )
- Rubrik
- Klassen und Objekte (PHP 5)
- Kurzform
- -----
- Vorschau
- ... was und wie das Objekt iteriert wird. Beispiel 19-23. Objektiteration mit implementiertem Iterator <?php class MyIterator implements Iterator { private $var = array(); public function __construct ( $array ) { if ( is_array ( $array )) { $this -> var = $array ; } } public function rewind () { echo "spulen\n" ; reset ( $this -> var ); } public function current () { $var = current ( $this -> var ); echo "aktuell: $var \n " ; return $...
- PHP Manual
- [ Objektiteration php.net ]
- PHP Funktion
- imap_list ( phplist Code 24% Relevanz )
- Rubrik
- IMAP POP3 und NNTP Funktionen
- Kurzform
- imap_list -- Read the list of mailboxes
- Vorschau
- ...() example <?php $mbox = imap_open ( "{imap.example.org}" , "username" , "password" , OP_HALFOPEN ) or die( "can't connect: " . imap_last_error ()); $list = imap_list ( $mbox , "{imap.example.org}" , "*" ); if ( is_array ( $list )) { foreach ( $list as $val ) { echo imap_utf7_decode ( $val ) . "<br />\n" ; } } else { echo "imap_list failed: " . imap_last_error () . "\n" ; } imap_close ( $mbox ); ?> See also: imap_getmailboxes...
- PHP Manual
- [ imap_list php.net ]
- PHP Funktion
- Accepting Arguments ( phplist Code 22% Relevanz )
- Rubrik
- Zend API: Hacking the Core of PHP
- Kurzform
- -----
- Vorschau
- ...of the type IS_OBJECT . Tabelle 46-7. Zend Variable Type Constants Constant Description IS_NULL Denotes a NULL (empty) value. IS_LONG A long (integer) value. IS_DOUBLE A double (floating point) value. IS_STRING A string. IS_ARRAY Denotes an array. IS_OBJECT An object. IS_BOOL A Boolean value. IS_RESOURCE A resource (for a discussion of resources, see the appropriate section below). IS_CONSTANT A constant (defined) value. To access a long you ...
- PHP Manual
- [ Accepting Arguments php.net ]
- PHP Funktion
- preg_replace_callback ( phplist Code 21% Relevanz )
- Rubrik
- Reguläre Ausdrücke Funktionen (Perl-kompatibel)
- Kurzform
- preg_replace_callback -- Sucht und ersetzt einen regulären Ausdruck unter Verwendung eines Callbacks
- Vorschau
- ... zu verarbeiten <?php $input = "plain [indent] deep [indent] deeper [/indent] deep [/indent] plain" ; function parseTagsRecursive ( $input ) { $regex = '#\[indent]((?:[^[]|\[(?!/?indent])|(?R))+)\[/indent]#' ; if ( is_array ( $input )) { $input = '<div style="margin-left: 10px">' . $input [ 1 ]. '</div>' ; } return preg_replace_callback ( $regex , 'parseTagsRecursive' , $input ); } $output = parseTagsRecursive ( $input ); echo $...
- PHP Manual
- [ preg_replace_callback php.net ]
- PHP Funktion
- XML Parser Functions ( phplist Code 21% Relevanz )
- Rubrik
- Funktionsreferenz
- Kurzform
- -----
- Vorschau
- ...PIHandler" ); xml_set_default_handler ( $xml_parser , "defaultHandler" ); xml_set_external_entity_ref_handler ( $xml_parser , "externalEntityRefHandler" ); if (!( $fp = @ fopen ( $file , "r" ))) { return false ; } if (! is_array ( $parser_file )) { settype ( $parser_file , "array" ); } $parser_file [ $xml_parser ] = $file ; return array( $xml_parser , $fp ); } if (!(list( $xml_parser , $fp ) = new_xml_parser ( $file ))) { die( "could not open ...
- PHP Manual
- [ XML Parser Functions php.net ]
- PHP Funktion
- radius_cvt_int ( phplist Code 18% Relevanz )
- Rubrik
- Radius
- Kurzform
- radius_cvt_int -- Converts raw data to integer
- Vorschau
- ... (PECL) radius_cvt_int -- Converts raw data to integer Beschreibung int radius_cvt_int ( string data ) Beispiele Beispiel 1. radius_cvt_int() example <?php while ( $resa = radius_get_attr ( $res )) { if (! is_array ( $resa )) { printf ( "Error getting attribute: %s\n" , radius_strerror ( $res )); exit; } $attr = $resa [ 'attr' ]; $data = $resa [ 'data' ]; switch ( $attr ) { case RADIUS_FRAMED_MTU : $mtu = radius_cvt_int ( $data ); ...
- PHP Manual
- [ radius_cvt_int php.net ]
- PHP Funktion
- radius_cvt_addr ( phplist Code 17% Relevanz )
- Rubrik
- Radius
- Kurzform
- radius_cvt_addr -- Converts raw data to IP-Address
- Vorschau
- ... (PECL) radius_cvt_addr -- Converts raw data to IP-Address Beschreibung string radius_cvt_addr ( string data ) Beispiele Beispiel 1. radius_cvt_addr() example <?php while ( $resa = radius_get_attr ( $res )) { if (! is_array ( $resa )) { printf ( "Error getting attribute: %s\n" , radius_strerror ( $res )); exit; } $attr = $resa [ 'attr' ]; $data = $resa [ 'data' ]; switch ( $attr ) { case RADIUS_FRAMED_IP_ADDRESS : $ip = radius_cvt_addr ( $...
- PHP Manual
- [ radius_cvt_addr php.net ]
- PHP Funktion
- radius_get_attr ( phplist Code 17% Relevanz )
- Rubrik
- Radius
- Kurzform
- radius_get_attr -- Extracts an attribute
- Vorschau
- ...ückgabewerte Returns an associative array containing the attribute-type and the data, or error number <= 0. Beispiele Beispiel 1. radius_get_attr() example <?php while ( $resa = radius_get_attr ( $res )) { if (! is_array ( $resa )) { printf ( "Error getting attribute: %s\n" , radius_strerror ( $res )); exit; } $attr = $resa [ 'attr' ]; $data = $resa [ 'data' ]; printf ( "Got Attr:%d %d Bytes %s\n" , $attr , strlen ( $data ), bin2hex ( $...
- PHP Manual
- [ radius_get_attr php.net ]
- PHP Funktion
- Funktionen zur Behandlung von Variablen ( phplist Code 17% Relevanz )
- Rubrik
- Funktionsreferenz
- Kurzform
- -----
- Vorschau
- ... -- Returns the resource type gettype -- Liefert den Datentyp einer Variablen import_request_variables -- Import GET/POST/Cookie variables into the global scope intval -- Konvertiert einen Wert nach integer is_array -- Prüft, ob die Variable ein Array ist is_bool -- Prüft, ob eine Variable vom Typ boolean ist is_callable -- Verify that the contents of a variable can be called as a function is_double -- Alias von is_float() is_float...
- PHP Manual
- [ Funktionen zur Behandlung von Variablen php.net ]
- PHP Funktion
- radius_cvt_string ( phplist Code 16% Relevanz )
- Rubrik
- Radius
- Kurzform
- radius_cvt_string -- Converts raw data to string
- Vorschau
- ...PECL) radius_cvt_string -- Converts raw data to string Beschreibung string radius_cvt_string ( string data ) Beispiele Beispiel 1. radius_cvt_string() example <?php while ( $resa = radius_get_attr ( $res )) { if (! is_array ( $resa )) { printf ( "Error getting attribute: %s\n" , radius_strerror ( $res )); exit; } $attr = $resa [ 'attr' ]; $data = $resa [ 'data' ]; switch ( $attr ) { case RADIUS_FILTER_ID : $id = radius_cvt_string ( $data...
- PHP Manual
- [ radius_cvt_string php.net ]
- PHP Funktion
- Error Handling and Logging Functions ( phplist Code 14% Relevanz )
- Rubrik
- Funktionsreferenz
- Kurzform
- -----
- Vorschau
- ... a critical user error error_log ( $err , 3 , "/usr/local/php4/error.log" ); if ( $errno == E_USER_ERROR ) { mail ( "phpdev@example.com" , "Critical User Error" , $err ); } } function distance ( $vect1 , $vect2 ) { if (! is_array ( $vect1 ) || ! is_array ( $vect2 )) { trigger_error ( "Incorrect parameters, arrays expected" , E_USER_ERROR ); return NULL ; } if ( count ( $vect1 ) != count ( $vect2 )) { trigger_error ( "Vectors need to be of the ...
- PHP Manual
- [ Error Handling and Logging Functions php.net ]
- PHP Funktion
- radius_get_vendor_attr ( phplist Code 13% Relevanz )
- Rubrik
- Radius
- Kurzform
- radius_get_vendor_attr -- Extracts a vendor specific attribute
- Vorschau
- ... Returns an associative array containing the attribute-type, vendor and the data, or FALSE on error. Beispiele Beispiel 1. radius_get_vendor_attr() example <?php while ( $resa = radius_get_attr ( $res )) { if (! is_array ( $resa )) { printf ( "Error getting attribute: %s\n" , radius_strerror ( $res )); exit; } $attr = $resa [ 'attr' ]; $data = $resa [ 'data' ]; printf ( "Got Attr:%d %d Bytes %s\n" , $attr , strlen ( $data ), bin2hex ( $...
- PHP Manual
- [ radius_get_vendor_attr php.net ]
- PHP Funktion
- Object Aggregation/Composition Functions ( phplist Code 13% Relevanz )
- Rubrik
- Funktionsreferenz
- Kurzform
- -----
- Vorschau
- ... as $k => $v ) $out [] = " \t $k => $v" ; return implode ( "\n" , $out ); } function object_info ( $obj ) { $out [] = "Class: " . get_class ( $obj ); foreach ( get_object_vars ( $obj ) as $var => $val ) { if ( is_array ( $val )) { $out [] = "property: $var (array) \n " . p_arr ( $val ); } else { $out [] = "property: $var = $val" ; } } foreach ( get_class_methods ( $obj ) as $method ) { $out [] = "method: $method" ; } return implode...
- PHP Manual
- [ Object Aggregation/Composition Functions php.net ]
- PHP Funktion
- Extending PHP 3 ( phplist Code 9% Relevanz )
- Rubrik
- PHP und Zend Engine Interna
- Kurzform
- -----
- Vorschau
- ... a parameter to IS_STRING make sure you first assign the new estrdup()'ed string and the string length, and only later change the type to IS_STRING. If you change the string of a parameter which already IS_STRING or IS_ARRAY you should run pval_destructor on it first. Variable Function Arguments A function can take a variable number of arguments. If your function can take either 2 or 3 arguments, use the following: Beispiel 48-2. Variable ...
- PHP Manual
- [ Extending PHP 3 php.net ]