Hi,
Just wondering if someone could help me, as I'm a little out of my depth and it's just not working!
I have a database which is good - the information is in Spanish and on one page of the web site I want the information to be in English.
So I have created an array:
PHP Code:
<?php require_once('../db_connect.php');
$where_clause = ""; $prefix = " and ";
// Create array.
$good_event = array (
'Rutas 4X4' => '4X4 Trails',
'Senderismo' => 'Hiking',
'Espeleo' => 'Caving',
'Descenso de Barranco' => 'Canyoning',
'Rutas a Caballo' => 'Horse Riding',
'Paseos en Bicicleta' => 'Bike Rides',
'Kayak' => 'Kayak',
'Visitas' => 'Guided Visits',
);
if (strlen($_GET['event']) > 0 && isset($good_event[$_GET['event']])) {
$where_clause .= $prefix."event='".$good_event[$_GET['event']]."'";
$prefix = " and ";
}
$query = "SELECT * FROM calendar_event GROUP BY month, day, year ORDER BY month ASC limit 10";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
echo "<a href='http://www.domain.com/calendario-actividades.php'>".$good_event[$row->event]."</a><br>
<a href='http://www.domain.com/calendario-actividades.php'>{$row['day']}/{$row['month']}/{$row['year']} <br> {$row['location']}
<br>{$row['description']}
</a>
<img src='../images/img15-short.jpg' alt='Salamanda Multi Aventura' />
";
} ?>
But it just not showing the translation in the array - I have changed it so many times and looked it up in php.net but I haven't found the solution.
Would really appreciate a bit of help.
Thanks
Rachel
|