|
|
|
Yazan
|
Konu: setcookie ile array oluşturma [Anlatım] (Okunma Sayısı 271 defa)
|
HoiRaT
Ziyaretçi
|
Aslında mantığı basit. Umarım işinize yarar. <?php
// Set variables $time = time()+3600; $hoirat = $_COOKIE['hoirat'];
if (empty($hoirat)) { // Send some cookies as an array setcookie('hoirat[php]', 'coder', $time); setcookie('hoirat[html]', 'designer', $time); setcookie('hoirat[pc]', 'freak', $time); setcookie('hoirat[game]', 'maniac', $time); echo 'Some cookies had been send. Please refresh your browser to take effects...'; } else { // Output: Array ( [php] => coder [html] => designer [pc] => freak [game] => maniac ) print_r($hoirat);
}
?>
|
|
|
|
|
Logged
|
|
|
|
|
 |
|