Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6609805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:45:41+00:00 2026-05-25T19:45:41+00:00

i want to use google chart map which is a piece of javascript code

  • 0

i want to use google chart map which is a piece of javascript code that take some data and display them on a map.

the chart data value are inside the javascript.

i need to retrive values from a mysql DB an insert them into the JS can i do this with php inside a js?

google.load('visualization', '1', {packages: ['geochart']});

function drawVisualization() {
  var data = new google.visualization.DataTable();
  data.addRows(6);
  data.addColumn('string', 'Country');
  data.addColumn('number', 'Minds');
  data.setValue(0, 0, 'Germany');
  data.setValue(0, 1, 200);
  data.setValue(1, 0, 'United States');

i need to take the instruction: data.setValue(0,0,’germany’)

and change in something like, data.setValue()

can i do this?

i can create a .php page, first connect to the DB then store the data write the js with echo and put the variable there?

thank you for your suggestion,

regards.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:45:42+00:00Added an answer on May 25, 2026 at 7:45 pm

    Simple answer: Yes!

    PHP scripts are parsed by the web server before being sent out. This means that all database queries are done before any data leaves the server.

    Javascript is a client side language, which means that you could simply copy+paste your javascript into a .php files, and change

    setValue(0, 1, 200) 
    

    to something like:

    setValue(<?= $val1 ?>, <?= $val2 ?>, '<?= $val3 ?>');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use Google Chart API using javascript. (I don't want to use
I just want to know that which languages or tech. did google use to
I want to use Google spreadsheets to store data online so multiple people can
I want Google chart to make better use of the vertical space available for
I'm maintaining some code that I want to add a chat feature to. I
I want to use google chrome as a control. I think Enso does this
I want to use Powershell to write some utilities, leveraging our own .NET components
I want to use the MultipleLookupField control in a web page that will run
Does anybody know of a Javascript chart API that will handle scaling and labeling
I see this link to use google chart api for putting multiple line charts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.