Hallo
edit
Ich hab folgende Abfrage
$counting_statsCmd = "SELECT COUNT(*) as bewertung_count, bewertung FROM server_evaluate WHERE server = '".esc($db, $_GET['name'])."' AND game = '".esc($db, $_GET['game'])."' GROUP BY bewertung";
$counting_statsQry = mysqli_query($db, $counting_statsCmd);
$counting_stats = mysqli_fetch_array($counting_statsQry);
Das gibt mir folgendes (in der Datenbank) aus:
http://puu.sh/bejIN/d3ca79d251.png
Wie kann ich jetzt in PHP nur die Zahl ausgeben die ich haben will?
mit
[PHP]
//Variante1
//Variante2
<?=$counting_stats['bewertung_count']['2']?>[/PHP]
Bei Variante1 krieg ich die Ausgabe „1“
Bei Variante2 krieg ich die Ausgabe „Notice: Uninitialized string offset: 2 in C:\Server\htdocs\leer\libs\server.php on line 231“
MfG