Gerard Samuel wrote:
Not sure if the subject was worded correctly, but
I was looking to see if this (or something like it) is possible.

$array = array('key_1' => 'This is some text',
                        'key_2' => '<b>' .  $array['key_1'] . '</b>'
                      );

And the array structure would be something like ->
array('key_1' => 'This is some text',
         'key_2' => '<b>This is some text</b>')

Just wanted to see if it were possible, as my attempts were futile.
Its not a requirement on my end, just wanted to see if it were possible... :)

Thanks


It is possible in 2 steps:

1. create the array:

$array = array('key_1' => 'This is some text');

2. Add the second key:

$array['key_2'] => '<b>' .  $array['key_1'] . '</b>';

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to