NYCPHP Meetup

NYPHP.org

[nycphp-talk] DEFINED array

Gographics mail at gographics.biz
Wed Oct 13 01:50:41 EDT 2004


Hi

Anyone know if its possible to 'define' an array?

define(DEFINED_ARRAY,$my_array);

tried this

<?php

   $my_array = array('yaks','llamas','wombats');

   define("DEFINED_ARRAY","test");
   // assigning value
   ${DEFINED_ARRAY} = $my_array;
   // getting value back
   echo ${DEFINED_ARRAY}[0];
   ?>

but no really what is wanted more like

echo DEFINED_ARRAY[0[;

Ash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1126 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20041013/356363a3/attachment.bin>


More information about the talk mailing list