I've been trying to get PHP to retrieve a array of Strings from a Java method and it just doesn't want to work. The code below should work but it just gives me an array of 1 item not the 5 items it should.
<?php
$myj = new Java("testObject");
$temp[] = $myj -> getArray();
echo count($temp); //always 1
?>
----Java code---
public class testObject
{
public testObject(){}
public String[] getArray()
{
String[] temp = new String{"test1","test2","test3","test4","test5"};
return temp;
}
}
Can anyone tell me what I'm doing wrong?
thanks,
blair