From: Bob T. <bo...@el...> - 2002-03-21 17:05:37
|
I just thought of two reasons to use a function call instead of just a variable assignment. 1. You could pass the entire string into the function call. If the function doesn't have a variable of that name, it just returns the string that is passed in: show_string('Do you really mean it') function show_string($key) { If ( ! ($lang[$key] ) { return $key; } This would make it easy when developing code to get everything right before creating abbreviation keys and changes to the translation file or database. The other reason is so that the function can log certain types of messages that are very unexpected, (Database not available or 'Cant write to file XYZ fior instance) or indicate a possible security breach or hacking attempt ( "Too many login attempts" ) -- Bob Treumann, 651-603-1245 Elmwood Solutions Inc. (St. Paul, Minnesota) bo...@el... http://www.elmwood.com ORACLE Business Alliance Program Member |