Dynamic assignment of array dimension using php to java bridge.
How do you pass a number from php code to java which assigns the dimension of an array in Java?
In java, I have a definition statement of an array :
public class sneak {
int fl
int pure [][] = new int[fl][2] ;
This is followed by several methods (no main method, since all calls are to these methods from php.
The method that sets fl is as follows:
public void days(int $fl)
{ fl = $fl ; }
(In php, the calling statements to the days method is :
$sum = new Java ('sneak') ;
$sum ->days($fl)
The above statements transfer known quantity $fl to sneak.java )
All is well except the dimension fl is not assigned to the pure[fl][2] array.
In fact $fl is properly tranferred, and fl is set properly as welll, BUT it is not recognized in pure[fl][2] dimension.
Any suggestions or references would be greatly apppreciated!
Paul