Tagged: programming RSS Toggle Comment Threads | Keyboard Shortcuts

  • nijikokun 12:45 am on July 18, 2009 Permalink | Reply
    Tags: arrays, php, programming   

    This angered me. I couldn’t find a way to turn multidimensional arrays into a single array with only keys that are not empty. Should support infinite dimensions. Haven’t hard tested it but it works for what I needed it for.

    // DE MULTIDIMENSIONAL
    function single($ar, $new = array())
    {
    $new = $new;

    foreach($ar as $key => $data)
    {
    if(is_array($data))
    {
    $new = single($data, $new);
    }
    else if(!empty($data))
    {
    $new[$key] = $data;
    }
    }

    return $new;
    }

     
  • nijikokun 2:02 am on July 13, 2009 Permalink | Reply
    Tags: forms, programming,   

    I hate coding forms. Validation process = scrutinizing. Holy shit I spelled that word correctly… anyway.

     
  • nijikokun 2:28 am on July 10, 2009 Permalink | Reply
    Tags: decisions, programming, stuff   

    Thinking about creating a manga viewer.

    However the question is.. for what purposes!?

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel
Follow

Get every new post delivered to your Inbox.