basic-regex-23-SplitDemo.php / php
<html> <head> <title>split() Function Demo</title> </head> <body> <?php myString2 = "2004.09.23"; myPattern = "[-/.]"; list(month, myPattern, <p>String was: myString1. <br />Year: <br />Month: month <br />Day: </p>"; list(year, day) = split(myString2); echo "<br /><br /><p>String was: <br />Year: year <br />Month: <br />Day: day</p>"; list(month, myPattern, <br /><br /><p>String was: myString3. <br />Year: <br />Month: month <br />Day: </p>"; ?> </body> </html>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.