Edit report at http://bugs.php.net/bug.php?id=15128&edit=1
ID: 15128 Updated by: j...@php.net Reported by: paul dot schaap at dingoblue dot com dot au Summary: php_java array access -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: Any PHP Version: 4.1.1 Block user comment: N Private report: N New Comment: There is no php_java anymore, at least in PHP core. Previous Comments: ------------------------------------------------------------------------ [2002-01-20 19:28:13] paul dot schaap at dingoblue dot com dot au Hello, Currently under the php_java extension to access array elements you must pull the whole array/hashtable into a php variable before you can access its elements. e.g. r.java ####################################### import java.util.*; public class r { public Hashtable y = new Hashtable(); public void r() { y.put("x","xx"); } } ####################################### <?php $je = new Java("r"); $je->r(); $ht = $je->y; echo $ht["x"]; ?> It would be much nicer (and more php'esque) to access the array and hashtable variables directly like so :- <?php $je = new Java("r"); $je->r(); echo $je->y["x"]; ?> As a trial I ported my custom database access class to Java JDBC with connection pooling, which went very smoothly bar this one difference (I have relied heavily on '$je-> y["x"];' style access in my arrays in my pages). I have had a little stab at figuring out from the source how to implement this, but it is beyond my abilities. Hence my feature request. REGARDS Paul ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=15128&edit=1