Can PHP be more like python? [duplicate]
Possible Duplicate:
Does PHP have an equivalent to Python's list com开发者_如何学编程prehension syntax?
Does PHP have any equivalent of the simple and awesome list comprehension in python? Specifically, can I do a = [x for x in xrange(1,20)]
in PHP w/o annoying loops?
I think this will set you free: http://code.google.com/p/php-lc/
Correct me if I'm wrong, but isn't the python 'x for x in xrange' a loop?
$a = range(1,19);
精彩评论