john.brown Posted April 1, 2006 Report Share Posted April 1, 2006 Nu re, šitā iet: $this->bar[] = $b; $a = & $this->bar[count($this->bar) -1]; Tak tas notiek ciklā , un katru reizi izsaukt count() negribās. Pēc loģikas šitam ar vajadzētu iet: $a = & $this->bar[] = $b; Tak nekā, syntax error:unexpected "=" in line... Kāds var ko ieteikt? Link to comment Share on other sites More sharing options...
Delfins Posted April 1, 2006 Report Share Posted April 1, 2006 tā gan neies. a vot šitā ies... class a { function doit($b) { $a = & $this->bar[]; $a = $b; } } Link to comment Share on other sites More sharing options...
john.brown Posted April 1, 2006 Author Report Share Posted April 1, 2006 Paldies Delfin, viss ok :) Link to comment Share on other sites More sharing options...
Recommended Posts