Array type überprüfen
maxell
- php
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
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
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
.