Internet Marketing, Web Development and Programming Stuff

Posts Tagged ‘drupal’

thumbnail

uri_part: A PHP Function for Working with the Current URI

A PHP function that makes it extremely easy to display dynamic content within your existing Content Management System (CMS), web application framework or standard “PHP-enabled” website. function uri_part($n) { $path = explode(“/”, $_SERVER["REQUEST_URI"]); for ($i = 0; $i <= count($path); $i++) { if(is_null($path[$i]) || $path[$i] == “”) { unset($path[$i]); } } $path = array_values($path); switch($n) …