使用php和mysql与jquery bMap

For a university project I am creating a website that helps you find golf courses around Ireland & N.Ireland. I have done this using bMap - jquery and google maps. You can choose a county from a sidebar and be shown it on the map. I have used the following code to do this:

$(document).ready(function(){ 
    $("#map").bMap({
        mapZoom: 8,
        mapCenter:[53.65115,    -8.81104],
        mapSidebar:"sideBar", //id of the div to use as the sidebar
        markers:{"data":[
                {"lat":"54.66625","lng":"-6.28647","title":"County Antrim","rnd":"1","body":"There are 38 golf clubs in County Antrim, <a href='counties/antrim.html'>View here</a>"},

                {"lat":"54.29401","lng":"-6.66592","title":"County Armagh","rnd":"1","body":"There are 8 golf clubs in County Armagh, <a href='counties/armagh.html'>View here</a>"},

What I am wondering is there a way I can create a database and use php/mysql to show the same results. I need it to be County Antrim, County Armagh, etc.

Thanks in advance for any help.

Store the courses in the database with the columns required such as latitude, longitude, title, rnd, body. Then build a string with them, and reference that in the JavaScript code.

$course_data = "";
$sql = "SELECT * FROM golf_courses";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
    $course_data .= '{"lat":"' . $row['latitude'] . '","lng":"' . $row['longitude'] . '","title":"' . $row['title'] . '","rnd":"' . $row['rnd'] . '","body":"' . $row['body'] . '"},'
}

And then in your code, reference the course_data variable, for example:

$(document).ready(function(){ 
    $("#map").bMap({
        mapZoom: 8,
        mapCenter:[53.65115,    -8.81104],
        mapSidebar:"sideBar", //id of the div to use as the sidebar
        markers:{"data":[
                <?php echo $course_data; ?>

Remember this is an example and will need some playing around with to get the database tables right etc.