euphoric Posted April 1, 2010 Report Share Posted April 1, 2010 $this->ua_ff = 'some string'; $this->ff = 'ff'; kā lai pie $this->ua_ pielīmē $this->ff vērtību lai sanāk: $this->ua_ff mainīgais kura rezultātu var izvadīt ? Quote Link to comment Share on other sites More sharing options...
2easy Posted April 1, 2010 Report Share Posted April 1, 2010 (edited) vēlreiz? un ar vnkāršiem paplašinātiem teikumiem paskaidro šo vietu pie $this->ua_ pielīmē $this->ff vērtību lai sanāk: $this->ua_ff mainīgais ja vajag lai galā sanāk tas $this->ua_ff mainīgais, tad uzreiz to vnk piešķir un tas būs sanācis! $this->ua_ = $this->ua_ff; hmm, varbūt tu gribēji vnk $this->ua_ff = $this->ua_ . $this->ff; ohh, laikam tas bija april april topiks? :D:D:D Edited April 1, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
sandis_m Posted April 1, 2010 Report Share Posted April 1, 2010 (edited) vēlreiz? un ar vnkāršiem paplašinātiem teikumiem paskaidro šo vietu ja vajag lai galā sanāk tas $this->ua_ff mainīgais, tad uzreiz to vnk piešķir un tas būs sanācis! $this->ua_ = $this->ua_ff; hmm, varbūt tu gribēji vnk $this->ua_ff = $this->ua_ . $this->ff; ohh, laikam tas bija april april topiks? :D:D:D Ko tu muldi, cilvēkam vajag salīmēt. Tātad (+) ar PVA līmi, $this->ua + $this->ff = 'some string april'; :D Edited April 1, 2010 by who_i_am Quote Link to comment Share on other sites More sharing options...
2easy Posted April 1, 2010 Report Share Posted April 1, 2010 pēc tā apmēram izklausījās ^^ Quote Link to comment Share on other sites More sharing options...
codez Posted April 1, 2010 Report Share Posted April 1, 2010 (edited) echo $this->{'ua_'.$this->ff}; Edited April 1, 2010 by codez Quote Link to comment Share on other sites More sharing options...
bubu Posted April 1, 2010 Report Share Posted April 1, 2010 Nevajag taisīt tādus mainīgos. Vajag normālus asociatīvos masīvus taisīt: $this->ua = array("aa" => "aa vērtība", "bb" => "bb vērtība", "ff" => "some string"); $this->ff = "ff"; echo $this->ua[$this->ff]; Quote Link to comment Share on other sites More sharing options...
euphoric Posted April 2, 2010 Author Report Share Posted April 2, 2010 Pāldies. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.