Blog

I Silly Love PHP

2018-03-17

So what do I love about PHP?

Arrays!!

What an efficient way to keep track of a list of information. All you need is a text file and some characters to serve as delimiters. 

Then, like particles versus waves, there are two ways of accessing your list - as a 'string' composed of a sequence of characters, or as an 'array', where each list item is assigned a numbered position, like letters in post office boxes.

The best part is that strings can be'exploded' into arrays and arrays 'imploded' back into strings. Those words conjure up such a graphic image. I wonder who thought that up.

After using arrays for a while, the implode and explode functions have become second nature and I find myself using the concept in other parts of my life as well.

At night,my cats are strung out on the bed, separated by '    '. Then in the morning, they 'exploded into

hungryCats[1] and hungryCats[2]

and I have to prepare

$catFood[1] = 'liver';
$catFood[2] = 'turkey';

if (! in_array($catFood, 'turkey') || ! in_array ($catFood, 'liver') ) {

I'm in trouble;.}

Do other people find themselves getting code mixed up in their regular lives?

Maybe there's not really a difference.  Computer language seems to be full of metaphors.

Delimiters, for instance.  In order for information to be useful, it needs to findable, to have it's own separate spot in digital memory.  And people do too. We each need our own 'space'. When our boundaries are ill-defined and we don't feel that we have a place in life, we don't do very well. How many of us feel that we don't fit in or we don't belong here? Or, that another person's boundaries are intermingled with our own?

So hey, get to a digital psychiatrist and learn how to establish your own place on the string of life and make sure and get a good delimiter. So....

$YourLIfeArray = explode ("!!!", $opportunityString);
Category: coding,general

Leave a Comment

Comments for I Silly Love PHP