|
Posted by ZeldorBlat on 07/11/07 14:01
On Jul 11, 9:46 am, Sebastian Deutsch <spam...@9elements.com> wrote:
> Hello,
>
> is there a shorter syntax for array beside array("one", "two"),
> something link {"one", "two"}?
>
> cheers
>
> sebastian
Actually, now that I thought about it more, you could write a function
and shorten it to a single character. So something like this:
function a() {
$arr = func_get_args();
return $arr;
}
$anArray = a('one', 'two');
Of course you can't assign keys that way, though.
Navigation:
[Reply to this message]
|