maxell: Array type überprüfen

Hallo

wie überprüft man ob eine variable $xy ein Type Array ist oder nur eine einfache variable/string?

z.b:

$xy = array ("mensch", "tier", "gott");

if($xy...) {
echo "XY ist ein Type Array!";
} else {
echo "XY ist kein Type Array!";
}

MfG
maxell

  1. Moin!
    <?php
    $xy = array ("mensch", "tier", "gott");

    if(is_array($xy)) {
    echo "XY ist ein Type Array!";
    } else {
    echo "XY ist kein Type Array!";
    }
    ?>
    tschüss ichen

    --
    Selfcode: sh:( fo:| br: n4:& ie:% mo:| mo:| de:] zu:) fl:| ss:| ls:[ js:|
    1. Moin!
      <?php
      $xy = array ("mensch", "tier", "gott");

      if(is_array($xy)) {
      echo "XY ist ein Type Array!";
      } else {
      echo "XY ist kein Type Array!";
      }
      ?>
      tschüss ichen

      .