Autor Zpráva
kuba123
Profil *
Tímto jsem získal níže uvedenou datovou strukturu:

class Results{
   public $search, $data, $classNames;
   function __construct() {
   $this->search = New Search();
   $this->all = New all();
   $classNames = array();
   $classNames['search'] = get_object_vars($this->search);
   $classNames['all'] = get_object_vars($this->all);
   print_r($classNames);
   }
}

Array
(
[search] => Array
(
[colors] =>
[genders] =>
[gencount] =>
[users] =>
)

[all] => Array
(
[ids] =>
[colors] =>
[firstnames] => Array
(
)

[lastnames] =>
[genders] =>
[bodytypes] =>
[orientations] =>
[purposes] =>
[heights] =>
[weights] =>
[signs] =>
[ages] =>
[countries] =>
[cities] =>
[usertypes] =>
[regdates] =>
[editdates] =>
[hits] =>
[sgenders] =>
[users] =>
[photoinfo] =>
[pictures] =>
[classNames] =>
)

)

Ale chtěl bych to dostat ve formátu
Array search = array ( string colors , string genders, string gencount, string users )

čili abych měl hodnoty colors , genders, gencount, users

Zkoušel jsem array_flip() ale to nefunguje s touto datovou strukturou.

Poradíte? ;-)
Tori
Profil
array_keys
kuba123
Profil *
Super. Díky moc

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0