- In Action
The Php split function lets you extract data on a delimiter value. It is easy to user. It is not used very often. When doing this type of operation the implode and explode functions typically get used.
Just cut-n-paste to reuse.
<?php $passwd_line = "Foo:bar"; list($user, $pass) = split(":", $passwd_line, 2); echo $user; echo $pass; ?>