Ciao,
devo impostare un sito multilingue. L'idea è quella di caricare file diversi in base alla lingua richiesta:
italian.php
english.phpCodice PHP:$text = array();
$text[0] = 'ciao';
$text[1] = 'buongiorno';
La domanda è: per richiamare il $text all'interno delle funzioni è una buona idea usare il global??Codice PHP:$text = array();
$text[0] = 'hello';
$text[1] = 'good morning';
oppureCodice PHP:function prova()
{
global $text;
echo $text[0];
}
oppure altro???Codice PHP:function prova($text)
{
echo $text[0];
}

Rispondi quotando