I am getting data from my database without reloading the page by posting to a php page.
function getdata() {
  $.post( "somepath/getdata.php", function(o) {
    var texts = o.split('&;');
    // o is respond from php script
  });
}
The php looks like this:
<?php
$var1 = 'bar';
$var2 = 'foo';
//vars come from database
echo $var1."&;".$var2;
?>
My problem is that I want to pass multiple variables from php without putting them into a string and seperate them by some kind of separator ( in this case &; ). Is it possible to pass such variables directly to jquery without echoing them ?