habe mit einer Abfrage folgendes array erstellt:
wie kann ich beispielsweise [function] ausgeben ?
funktioniert nicht ...
mein 1. Lösungsansatz war folgender:
aber das geht auch nicht.. stehe voll auf dem Schlauch
Code:
Array ( [0] => stdClass Object ( [id] => 1 [squadname] => Paladine [squadadmin] => [squadpicture] => pala.jpg [published] => 1 [showrecruting] => 0 [ordering] => 2 [squadgame] => [orderalpha] => 0 [orderfunc] => 0 [registration_id] => 60 [session_id] => 1 [userid] => 63 [fullname] => Micha [email] =>micha@micha.de [registration_date] => 2006-07-03 09:50:24 [cancel_date] => 0000-00-00 00:00:00 [numregistrations] => 1 [viewed] => 0 [verified] => [status] => 0 [comments] => [payment_id] => 0 [uid] => 63 [sid] => 1 [function] => Handberians ) [1] => stdClass Object ( [id] => 5 [squadname] => Paladine [squadadmin] => [squadpicture] => pala.jpg [published] => 1 [showrecruting] => 0 [ordering] => 1 [squadgame] => [orderalpha] => 0 [orderfunc] => 0 [registration_id] => 53 [session_id] => 1 [userid] => 67 [fullname] => pala2 [email] =>pala@pala.de [registration_date] => 2006-07-03 08:48:26 [cancel_date] => 0000-00-00 00:00:00 [numregistrations] => 1 [viewed] => 0 [verified] => [status] => 0 [comments] => [payment_id] => 0 [uid] => 67 [sid] => 1 [function] => Topfezz )
PHP-Code:
echo $registrants[1]['function']
mein 1. Lösungsansatz war folgender:
PHP-Code:
foreach ($registrants as $outer_key => $inner_array)
{
foreach ($inner_array->['function'] as $value)
{
$charname = $value;
echo $charname;
}
};
Kommentar