Getting Java Println Outputs in PHP -


i'm trying output java application use below code output values

system.out.println(object.getnumber(3)); system.out.println(object.getnumber(4)); 

i'm using exec("somejavapath javaname", $output) , print_r($output) output array print. know values wanted format instead of

array ( [0] => 34 ) 

i want this

array ( [0] => 3 [1] => 4 ) 

does know format?

thanks

if not expecting comas in output java application , include coma between 2 values :

system.out.println(object.getnumber(3)); system.out.println(",");    // print coma in between system.out.println(object.getnumber(4)); 

then

$values_array = explode( ',', $output ); 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -