«Bed Intruder» lyrics

Original video: Youtube
Music by: Gregory Brothers
Words by: Antoine Dodson

«Bed Intruder» lyrics

Well…
Obviously we have a rapist in Linkin Park

He’s climbing your windows
Snatchin’ yo’ people up
Tryin’a to rape ‘em, so y’all need to
hide your kids, hide your wife
hide your kids, hide your wife
hide your kids, hide your wife
and hide your husband
‘cos they’re rapin’ errbody out here

You don’t have to come and confess
we’re lookin’ for you
we gon’ find you
we gon’ find you
so you can run and tell that,
run and tell that
run and tell that, homeboy
home, home, homeboy

we got your t-shirt
you done left fingerprints and all
you are so dumb
you are really dumb – for real
the man got away leaving behind evidence
i was attacked by some idiot in the project
so dumb, so dumb, so dumb, soooo

He’s climbing your windows
Snatchin’ yo’ people up
Tryin’a to rape ‘em
So y’all need to
hide your kids, hide your wife
hide your kids, hide your wife
hide your kids, hide your wife
and hide your husband
‘cos they’re rapin’ errbody out here

You don’t have to come and confess
we’re lookin’ for you
we gon’ find you
we gon’ find you
so you can run and tell that,
run and tell that
run and tell that, homeboy
home, home, homeboy

See the original Youtube video:

[youtube=http://www.youtube.com/watch?v=hMtZfW2z9dw&fs=1&hl=nb_NO]

Splitting a string into arrays in Smarty

This isn’t supposed to be a blog about programming, but I’m working a lot with PHP and Smarty these days, and whenever I manage to crack a problem, I get this strange feeling of acchievement. Then I come here to brag.

Anyway, here goes:

«How do I split a string in Smarty template engine?»

Well kind Sir, that’s quite an easy task. Here’s an example:

{assign var=”teststring” value=”31|32″}
{assign var=”testsplit” value=”|”|explode:$teststring}
{$testsplit[0]}<br />
{$testsplit[1]}

Let’s for example say you have a bunch of Meta Keywords that are bundled together in the database (games,game,online,playing) – and you want to separate them, so that you can create keyword-specific landingpages for on-site search optimalization (games – game - online - playing).

Here’s how you do it:
(we’re assuming you have a variable called $MetaKeywords!)

{* Splitting a long string into a bunch of different arrays *}
{assign var=”keywords” value=”,”|explode:$MetaKeywords}
{foreach from=$keywords item=keyword}
<a href=”/index.php?search={$keyword}”>{$keyword|trim}</a>,&nbsp;
{/foreach}

See what we did above? First we begin by telling the system that we want to create a new variable called $keywords. Then we continue by telling that the value we want to split is “,” and finally we tell it what string to use (in this case, $MetaKeywords).
This results in the string stored in $MetaKeywords being split into different arrays named $keyword[1], $keyword[2], $keyword[3] and so on.

Include PHP-file in Smarty

I’m teaching myself PHP and Smarty these days, and today I ran across a common problem:

«How do I include a PHP-file – or execute PHP-code – when using the Smarty template engine?»

After banging my head against the wall for a couple of hours, I finally found the solution. To include a PHP-file in a Smarty template, use the following code:

{include_php file=”/path/to/somefile.php”}

You can also use the following code to run and/or execute PHP-code within Smarty:

{php}
include(“includes/myname.php”);
{/php}

Hope this blog post helps some poor soul one day… Keep hacking.