I am having a coding problem which is probably simple to resolve. (I'm really an amateur coder.) Perhaps one of you experts could help me out.
I am using a PHP program which uses a java bridge to use some java code.
In summary the php part provides values to a 2-array which in java is called pure[][].
These values are called $sl and $yn.
The java program contains a method called loadpure which is supposed to take values from php and load the pure array in java. Everything looks good, but the scheme refuses to work. I have tried a variety of constructors, but I believe this code should have worked. Below are snipets of relevant php and java code. Any ideas or suggestions would be most welcome. Thank you.
Paul
<?php //snipet
$system = new Java('java.lang.System');
java_require("c:\javaclasses");
$check = new Java('Conveyor_Belt');
while ($row = mysqli_fetch_array($result)) {
$rownum +=1;
$sl = $row['slider'];
$yn = $row['yes_no'];
$dt = $row['entry_date'];
echo $check->loadpure($sl, $yn,$rownum); //call to method
JAVA snipet
public class Conveyor_Belt
{
public static int fl;
public int check;
int[][] pure = new int[fl][2];
public int loadpure(int $sl, int $yn, int $rownum)
{
int sl = $sl;
int yn = $yn;
int rownum = $rownum;
pure[rownum][0] = sl;
pure[rownum][1] = yn;
check = 9999;
return check;
}
}