I have a php function which I am using to calculate statistics of information in a database. I want to output the results in a string and pass it to JQuery to be able to make graphical representations of the data. 

Is it possible to pass a string from PHP into a JQuery method in this way? 

Thanks in advance