Bart Nessux wrote:[color=blue]
> Bruno Desthuilliers wrote:
>[color=green]
>> Bart Nessux wrote:
>>[color=darkred]
>>> In Python, I can do something like this:
>>>
>>> a,b,c = 1,2,3
>>>
>>> How might I do this with PHP?
>>>[/color]
>> Have a look at list()
>>
http://www.php.net/manual/en/function.list.php
>>
>> list($a, $b, $c) = Array(1, 2, 3);
>>
>> should do it. But it's not as readable as Python... !-)
>>
>> Bruno
>>[/color]
>
> Thanks for the tip... guess I'll stick to doing on var at a time.[/color]
Yeps, I think that's a better choice here. Still, the list() function
may come in handy sometimes...
[color=blue]
> One
> last question: How can I split long lines of PHP code up into smaller
> lines? For example, how can I turn this line:
>
> $12 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
>
> into this line:
>
> $12 = xxxxxxxxxxxxxx
> xxxxxxxxxxxxxx
> xxxxxxxxxxxxxx;
>[/color]
Assuming the xxxx is php code (not a string), you don't have anything
special to do. Like C and most maintstream languages, PHP uses ';' as
the instruction delimiter. So newlines, whitespaces etc have no special
meaning.
HTH
Bruno