beneberle


Member since 06/18/2009

10 snippets

7 profile views

View their favorites

Profile

All time reputation: 141

Achievement

first submission:submitting first snipplet

beneberle's Recent SnippetsTagged php



« Prev 1 Next »
  1. FAV

    Ternary Conditional Syntax

    Condition = The condition which must be met. True = Executed if the condition is met. False = Executed if the condition failes.
    PHP 4 views posted 8 years ago beneberle
  2. FAV

    PHP error reporting

    PHP saved by 2 people 10 views posted 8 years ago beneberle
  3. FAV

    US State/Abbreviations associative array

    PHP 0 views posted 8 years ago beneberle
  4. FAV

    Multi-Dimensional Array/Object Sort using usort and custom comparison function

    PHP 3 views posted 8 years ago beneberle
  5. FAV

    Joomla 1.5 - Blog Loop

    PHP 3 views posted 8 years ago beneberle
  6. FAV

    Simple User Agent (Mobile and Smartphone) Detection and Redirction with PHP

    Though an old post, this is my solution that's been pieced together from various comments on the article linked above.
    PHP saved by 5 people 10 views posted 9 years ago beneberle
  7. FAV

    Count occurrences of value in array, return values once

    I needed to trim a simple numerical array that might have duplicate values into an array with no duplicates. I came up with this before finding array_unique(). D\'oh.
    PHP 0 views posted 9 years ago beneberle
  8. FAV

    Change Default Joomla Database Table Prefix

    Substitute new_ placeholder in the second line with your new prefix. Run it: http://www.yoursite.com/rename.php and wait until it responds with an OK, usually after a couple of seconds. Delete the rename.php script. Edit the configuration.php file...
    PHP 2 views posted 9 years ago beneberle
  9. FAV

    Get Current Directory

    Returns path to physical
    PHP 0 views posted 9 years ago beneberle
  10. FAV

    List Contents of a Directory

    To make an image browser, add these lines: $ext = strtolower(substr("$dirArray[$index]", strrpos("$dirArray[$index]", '.') + 1)); //get file extensions if ("$ext" == "jpg") { // if file is a jpg print("<TR><TD>$dirArray[$index]<br/><a href=\...
    PHP saved by 1 person 0 views posted 10 years ago beneberle
« Prev 1 Next »