Posted by petersprc on 10/29/06 06:43
Unfortunately that syntax isn't supported. You can just create the
temporary array variable. If you really need something else, you could
try something like
function get(& $array, $key)
{
return $array[$key];
}
$ext = get(pathinfo($file), 'extension');
Koncept wrote:
> Hello All!
>
> I have been wondering for a while if it is possible to achieve the
> effect I have noted below without having to span many lines of code.
> Any creative insight without too much kludge involved would be
> appreciated? I just find coding like this much more elegant and clean.
>
> $extn = pathinfo( $file )['extension'];
>
> --
> Koncept <<
> "The snake that cannot shed its skin perishes. So do the spirits who are
> prevented from changing their opinions; they cease to be a spirit." -Nietzsche
[Back to original message]
|