14. 10. 2009. | #1 |
Ivan Dilber
Sir Write-a-Lot
|
smarty - assign_by_ref
postoji li ikakav razlog da se koristi assign(), umesto assign_by_ref() ?
osim naravno opskurnih fora da se assignuje varijabla, pa se onda naknadno menja u kodu, sto verujem da malo ko radi...
__________________
Leadership is the art of getting people to want to do what you know must be done. |
14. 10. 2009. | #2 |
Goran Pilipović
Sir Write-a-Lot
|
Po meni uglavnom u situacijama kada nemas varaijablu nego je "kreriras" u samom assign:
$smarty->assign ('error', 'Neko je zajebao stvar'); To ionako ne moze by reference.
__________________
Goran Pilipović a.k.a. Ugly Fingers Bradley f.k.a. bluesman I don't always know what I'm talking about but I know I'm right! |
14. 10. 2009. | #3 |
profesionalac
Qualified
|
^ Ili za podatke direktno iz neke funkcije/metode...
Kôd:
$smarty->assign('data', $db->fetch_array($sql));
__________________
www.salebab.net |
|
|
Slične teme | ||||
Tema | Početna poruka teme | Forum | Odgovori | Poslednja poruka |
Smarty 3 Released | bluesman | PHP | 27 | 19. 03. 2011. 02:30 |
Smarty 3 | bluesman | PHP | 26 | 01. 01. 2010. 21:03 |
Smarty register_resource() - db: | bluesman | PHP | 9 | 10. 02. 2006. 10:40 |
Alternativa za Smarty | oliver78 | PHP | 10 | 21. 01. 2006. 18:07 |
Zašto Smarty? | Ilija Studen | PHP | 47 | 24. 12. 2005. 18:11 |