home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomePHP CookbookSearch this book

5.4. Exchanging Values Without Using Temporary Variables

5.4.2. Solution

To swap $a and $b:

list($a,$b) = array($b,$a);


Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.