arrays of strings - accessing elements of array elements
| From: | Lee P Reilly | Date: | Thu, 28 Mar 2002 17:21:04 +0000 |
| Subject: | arrays of strings - accessing elements of array elements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90558@lists.php.net to get a copy of this message | ||
Hi,
Dodgy subject header or what...
I have array of strings called $composition, and I itterate through this
using:
$composition[$i]
Is there any way to echo the first character of the string by doing
something like:
$composition[$i][0] or ($composition[$i)][0] ?
I can easily just do something like:
$temp_var = $composition[$i];
echo $temp_var[0];
, but I want to know if it's possible to do it another way.
Any input greatly appreciated!
- Best regards,
Lee