ralf: mehrdimensionales array

Beitrag lesen

Ohne selbigen (den Code meine ich) kann ich dir da wohl nicht mehr weiterhelfen.

if ($artikel[1][2]=="  250") {
 $men[1]=array("  250","  500","  750"," 1000"," 1500","");
 if ($lay[1][0]=="bunt") {
  $preis[1]="170,00";
 } else {
  $preis[1]="000,00";
 }
} elseif ($artikel[1][2]==" 500") {
 $men[1]=array("  500","  250","  750"," 1000"," 1500","");
 if ($lay[1][0]=="bunt") {
  $preis[1]="190,00";
 } else {
  $preis[1]="000,00";
 }
} elseif ($artikel[1][2]==" 750") {
 $men[1]=array("  750","  250","  500"," 1000"," 1500","");
 if ($lay[1][0]=="bunt") {
  $preis[1]="205,00";
 } else {
  $preis[1]="000,00";
 }
} elseif ($artikel[1][2]==" 1000") {
 $men[1]=array(" 1000","  250","  500","  750"," 1500","");
 if ($lay[1][0]=="bunt") {
  $preis[1]="218,00";
 } else {
  $preis[1]="000,00";
 }
} elseif ($artikel[1][2]==" 1500") {
 $men[1]=array(" 1500","  250","  500","  750"," 1000","");
 if ($lay[1][0]=="bunt") {
  $preis[1]="250,00";
 } else {
  $preis[1]="000,00";
 }
} else {
 if (isset($sess_buy[1])) {
  $men[1]=array("  250","  500","  750"," 1000"," 1500","");
  if ($lay[1][0]=="bunt") {
   $preis[1]="170,00";
  } else {
   $preis[1]="000,00";
  }
 } else {
  $men[1]=array("","  250","  500","  750"," 1000"," 1500");
  $preis[1][3]="";
 }
}

und dann

$gesamt[1]=$preis[1][3]*$menge[1];

gruss

ralf