Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Usuwanie zmiennej, na którą wskazuje referencja.
Pax95
post 1.11.2010, 19:39:34
Post #1





Grupa: Zarejestrowani
Postów: 50
Pomógł: 7
Dołączył: 31.01.2009

Ostrzeżenie: (0%)
-----


Mam kod:
  1. public function offsetUnset( $offset )
  2. {
  3. $segments = explode( ".", $offset );
  4. $configPointer = &$this->config;
  5. foreach ( $segments as $segment )
  6. $configPointer = &$configPointer[$segment];
  7. }


Instrukcja unset( $configPointer ) spowoduje usunięcie referencji, zamiast elementu tablicy na jaki wskazuje.


--------------------
Nie zapomnij o
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 00:38