Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/01/2010, 18:28
Avatar de destor77
destor77
 
Fecha de Ingreso: noviembre-2004
Ubicación: Gálvez, Santa Fe, Argentina
Mensajes: 2.654
Antigüedad: 19 años, 6 meses
Puntos: 43
diferencia entre sintaxis

Hola,
tengo una pregunta media boba jeje, he visto que algunos sistemas usan esta sintaxis:
Código PHP:
Ver original
  1. function __construct($lang)
  2.     {
  3.         global $langs;
  4.         if(empty($lang) && file_exists("app/config/langs.php"))
  5.         include_once("app/config/langs.php");
  6.         else if(file_exists("app/config/langs.{$lang}.php"))
  7.         include_once("app/config/langs.{$lang}.php");
  8.         $this->lang = $langs;
  9.     }

que diferencia tiene con usar algo asi:
Código PHP:
Ver original
  1. function __construct($lang)
  2.     {
  3.         global $langs;
  4.         if(empty($lang) && file_exists("app/config/langs.php"))
  5.         include_once("app/config/langs.php");
  6.         else if(file_exists("app/config/langs.$lang.php"))
  7.         include_once("app/config/langs.$lang.php");
  8.         $this->lang = $langs;
  9.     }

no entiendo lo de usar los {} en las variables.

salu2