PHP echo row and specify it with a unique ID

OK, I am trying to make a language management in my backend.

The database is set up with different tables.
ID 1 in all tables is the same word just different languages.
Etc. for ID 2 and so on.

Spanish
ID Word
1 Word1
2 Word2
3 Word3
4 Word4

English
ID Word
1 Word1
2 Word2
3 Word3
4 Word4

The Code is this:

[php]<?php
include(“config.php”);
$ro=mysql_query(“SELECT * FROM japansk”) or die(mysql_error());
$r=mysql_fetch_object($ro);
?>

<?php echo $r->value;?>
<?php echo $r->value;?>
<?php echo $r->value;?>
<?php echo $r->value;?>
[/php]

When I change the language in the Mysql code, I want it to change all the words to the other table.

What I cant figure out is to specify the specific row.

I know this code is rubbish, but I am just trying to show that each echo is with a unique ID, so when I change the header language it will change the words to that specific language.
[php]<?php echo value WHERE id=1;?>

<?php echo value WHERE id=2;?>
<?php echo value WHERE id=3;?>
<?php echo value WHERE id=4;?>
[/php]

How many words are we talking? 10, 100, 1000… If a small amount it would be much easier to just use arrays. If it is a large number, then use Queries…

Let us know how ma y words we are talk’n about and we can do you up some code…

Sponsor our Newsletter | Privacy Policy | Terms of Service