<?php $path = "this/is/the/path/file.txt"; $parts = explode("/", $path); echo "<pre>";print_r($parts);echo "</pre>";
Standard input is empty
<pre>Array ( [0] => this [1] => is [2] => the [3] => path [4] => file.txt ) </pre>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!