"Ramil Sagum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > given a template : > ----- > <body> > User Information:<p> > Name: {$name}<br> > Address: {$address}<br> > </body> > ----- > and the php code: > ---- > $smarty = new Smarty; > $smarty->assign('name', 'george smith'); > $smarty->assign('address', '45th & Harris'); > $smarty->display('index.tpl'); > ----
I can do something very similar using DOM directly. Now that I have learned how to use DOM in PHP 5, it will (I hope) require just a few minutes to write some generalized functions to make things work in an equivalent manner. Doing things that way, the editor used to edit the UI can be virtually any HTML editor. My knowledge of the DOM and my code will be more portable to other languages. I am sure that Smarty can do many other useful things, but probably they are not needed for what I am doing. I think it is important to first learn the DOM and how to use it; it is a standard that can be used in an abundance of ways and in many other languages. Without becoming familiar with DOM it is difficult to understand the advantages of Smarty. You sent me a message offline from the newsgroup; I prefer to keep things in the list. You implied I am being ignorant. I try to avoid making emotional statements such as that. I tried to explain that I spend too much time learning things I can't use. It is not a matter of not wanting to learn; it is a matter of not wasting time. It is too easy for me to spend time learning something that I can't use. It is more a matter of having too great of a desire to learn. Since you are familiar with Smarty, it sure would help if you could explain it's advantage compared to using the DOM for what I am doing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php