Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
hi i've just started learning php and read a tutorial that included the following example:Code: Select all
<html>
<?php
$gebaeude = array(
"Möbel" => array("liegen"=>"Bett","liegen"=>"Sessel","sitzen"=>"Stuhl"),
"Häuser" => array("Einfamilienhaus",2 => "Mehrfamilienhaus",3 => "Reihenhaus"),
"Garagen" => array("für 1 Auto", "für zwei Autos", "Tiefgarage")
);
echo $gebaeude["Möbel","sitzen"]; // Sessel da der zweite Wert mit demselben Segment den ersten überschreibt
?>
</html>Code: Select all
Parse error: parse error, unexpected ',', expecting ']' in C:\Apache\htdocs\array2.php on line 8feyd | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]