PHP Next in an Associative Array…

This might me useful for some people…

If you want to echo the value of the next ‘key->value pair’ in an associative array. You can use:

$keys = array_keys($arr);
echo $arr[$keys[(array_search($key, $keys)+1)]];

Where $arr is the associative array, $keys is the $arr keys as values with numerical keys and $key is the $arr key of the key->value pair prior to the one you want to output.


$arr = array(
'12' => 'a',
'14' => 'b',
'20' => 'c',
'23' => 'd'

And you want to output the next value after ’14’=>’b’, which would be ‘c’. All you need to do is define $key = 14;

If you want to output the previous to ’14’=>’b’, just change the “+” to a “-“.

PHP Next in an Associative Array…

Sublime Text 2 Word Wrap Problem…

Recently I’ve been using ST2 on my new all-Linux setup, with the SFTP plugin of course…

However, I did come across some issues with certain file types not conforming to the predefined settings for no word wrapping.

Simply changing the ‘line break column number’ (have forgotten the actual variable name and I’m not at a computer ATM) to something large such as “9999”, seems to be an affective work around for now.

Sublime Text 2 Word Wrap Problem…

Skype 4 on Debain 6 64bit…

Due to some poor planning on behalf of Micro$haft, Skype 4 64bit support (the current version at the time of posting) for Debian 6 64bit and many derivatives such as CrunchBang 10 64bit has been screwed up. Skype should work in Debian 7 64bit and CrunchBang 11 64bit.

After some frustration and terminal-error output-monitoring. I’ve come up with a Skype package that does work on Debian 6 64bit etc.

Using some documentation found on the Skype site and other forums, I’ve built this package by overwriting some files with newer/older/different versions and a few file renames.

You can see my progress and disrepair over at the CrunchBang forums,

You can download my Skype package (h0zza mod) here:

Extract the archive to a folder called “bin” in your home directory. e.g. “/home/username/bin/skype-”. You can then run Skype by entering this, into a terminal.

<code>LD_LIBRARY_PATH=~/bin/skype-$LD_LIBRARY_PATH ~/bin/skype-</code>

It should work just fine, however only use “user generated” packages (like this one) as a last resort. In my case there was no other option.

As usual, I’m not responsible if your computer die’s, related or unrelated to this package! They call it CrunchBang for a reason! ūüėõ (It really should be fine, just covering my ass.)

I really wish there was a good alternative to Skype.

Skype 4 on Debain 6 64bit…

Transmission IP Blocklist…

Yet again, adding an IP blocklist to Transmission Bit Torrent Client has become even more obscure.

Currently the only way to add an IP blocklist without using external programs is by manually editing the programs config files. This is possible on all OS’s that Transmission supports, however the file paths I’ll be using in this post are for Linux, other than file locations, everything else should be universal.

The config file can be located at:


Continue reading “Transmission IP Blocklist…”

Transmission IP Blocklist…

Agriculture in the City…

As many of you may know, hozzamedia works¬†closely¬†with a few safety and health organisations. And¬†paradoxically,¬†recently due to the extraordinarily¬†huge work load, I can quite firmly deduce my health has suffered… ūüėõ

But when your cooped up in doors for days on end with no sun or outside influence, how can you stay healthy and work as a coffee guzzling, dark loving, flickering-screen, programming junky?

The answer is simply maintaining a healthy environment, with a few small, seemingly obvious tricks.

  1. Ventilation РOpen the Damn windows and put on a jumper.
  2. Cook – Spend some time and make your own food.
  3. Plants…

The first two are simple enough but the third may as well be Goa’uld technology¬†to me and others the-same.

Continue reading “Agriculture in the City…”

Agriculture in the City…

Lewis Reviews…

A very good and loved friend of hozzamedia (even since the early days). Has finally moved his talents of App Reviewing and Media over to the amazing world of Blogging!

Go check him out as we love Lewis and his content is genuinely bloody interesting! Well worth the read.

Some of my favourite articles at the time of writing this:

Lewis Reviews…

[Recognition!] IDE Code Styles :D

It’s always nice to¬†know¬†that real people actually read this blog! ūüėÄ (as I get few comments and thousands of hits! :P)

Mark, over at has added the hozzamedia SeeStyle or SSS Coda 2 theme to his theme list/archive!

Continue reading “[Recognition!] IDE Code Styles :D”

[Recognition!] IDE Code Styles :D