So you've got a navigation at some point on your site with images that, when clicked, will change parts of the page?
Because you've given no code and not much information, I can't give exact code, but it would be something along the lines of:
// get all the data from the necessary table
$get_data = mysql_query("SELECT * FROM some_table");
for($i = 0; $i < mysql_num_rows($get_data); $i++)
// store the table rows in to a PHP 3-dimensional associative array.
$results[$i] = mysql_fetch_assoc($get_data);
Let's say you've got 3 columns in your database: name, age, gender. These are now stored in PHP as: [FONT="Courier New"]$results[$i]['name'][/FONT], [FONT="Courier New"]$results[$i]['age'][/FONT] and [FONT="Courier New"]$results[$i]['gender'][/FONT].
var details= Array(name = Array(),
age = Array(),
gender = Array());
Now in PHP you can echo the results in to each of these arrays like so:
<?php for($i = 0; $i < count($results); $i++) echo "details[".$i."] = '" . $result[$i]["name"] . "',"; ?>
<?php for($i = 0; $i < count($results); $i++) echo "details[".$i."] = '" . $results[$i]["age"] . "',"; ?>
<?php for($i = 0; $i < count($results); $i++) echo "details[".$i."] = '" . $results[$i]["gender"] . "',"; ?>
For example, a button with an onClick event which calls a function "change();". Your "change();" function would look something like:
document.getElementById("your_div_id").innerHTML = "something";
You can also create a variable and give it a string value containing HTML, and set the .innerHTML value to the value of the variable.
Please provide more information so we can help more.