View RSS Feed

Recent Blogs Posts

PHP and mySQL related tips and code.

  1. Opting Out of Responsive Design (choosing desktop layouts on mobile)

    Responsive web design (done well) allows users to achieve their goals on any internet accessible device, but what if they *want* to view the fixed width desktop version of a website, even on mobile?

    This post comes at a time when responsive web design interest is piquing - certainly here on DD - probably the result of those emails we've been receiving via Google Webmaster Tools, that basically tell us how "X % of your web pages do not provide an optimal mobile experience... your ...
  2. PHP Stylesheet/Content Switcher with Save Cookie

    Here is a simple PHP script to change stylesheets or load in alternative content (conditional loading), with cookies to store user selection.

    The nice thing about a PHP-based solution over JavaScript content/CSS switchers, is that all the checking and switching is done on the server side, before the web page even finds it's way to the browser, so you don't get any flash of unstyled content. Plus, you can conditionally load HTML or external files (improve performance and save on load ...
  3. Paginated Responsive Modal Gallery (PHP/CSS3/JS)

    My modal gallery has evolved and here come versions 4 and 5. Both now include pagination but version 5 is PHP generated to help with maintainability.

    First, a recap on the gallery development so far;

    Now, so far, this gallery has only ...
  4. Heaps o' Fun

    yes, I'm still doing the tutorial. : )

    Did you know ...?

    PHP Code:

    class alphaHeap extends SplHeap{
        public function 
    compare$a,$b ){
    strcmp$b,$a );

    $alpha = new alphaHeap;

    # IN put:
    $alpha->insert'cat' );       // C
    $alpha->insert'dog' );       // D
    $alpha->insert'boy' );       // B
    $alpha->insert'elephant' );  // E

    Updated 12-23-2012 at 09:09 PM by traq

    PHP coding , Off beat topics
  5. Not My Type... : )

    Yes, the tutorial is still coming. It's big. It's in progress.

    I read this recently and was intrigued. Don't know if anyone else would care or not ...

    The author, nikic, does a great job summarizing the difficulties and potential benefits of type hinting, as well as giving a good explanation as to why PHP's implementation is incomplete. Personally, I look forward to being able to type-hint any type. It could save me a lot of code validating args, and I could ...

    Updated 12-01-2012 at 04:48 AM by traq

    PHP coding , Off beat topics
Page 1 of 2 12 LastLast