Wie speicher ich ein Array in einen Cookie?
Weil das gibt mir nur folgende Fehlermeldung:
Warning: setcookie() expects parameter 2 to be string, array given in /auftrag.1.php on line 196
PHP-Code:
$val = array('best' => array(
'cook1' => 'firma','cook2' => 'FNR_firma',
'cook3' => 'vorname','cook4' => 'FNR_vorname',
'cook5' => 'nachname','cook6' => 'FNR_nachname',
'cook7' => 'strasse','cook8' => 'FNR_strasse',
'cook9' => 'hausnr','cook10' => 'FNR_hausnr',
'cook11' => 'plz','cook12' => 'FNR_plz',
'cook13' => 'ort','cook14' => 'FNR_ort',
'cook15' => 'vorw1','cook16' => 'FNR_vorw1',
'cook17' => 'telefon','cook18' => 'FNR_telefon',
'cook19' => 'vorw2','cook20' => 'FNR_vorw2',
'cook21' => 'fax','cook22' => 'FNR_fax',
'cook23' => 'email','cook24' => 'FNR_email'));
setcookie("Bestellen",$val[best],time()+300,"/","$SERVER_NAME",0);
Warning: setcookie() expects parameter 2 to be string, array given in /auftrag.1.php on line 196
Kommentar