February 16, 2008

more reasons to reduce beef consumption

Today, I read an article in the New York Times, and watched the accompanying video, about sick cows made to stand and/or walk so they could be slaughtered, and then eaten.

About a year ago, I lowered my conventional beef intake to once a week. Now, I have decided that I will only eat naturally-raised beef once a week. I don’t want to be a vegetarian, and I don’t care for fish (even if I did, we hear so much about over-fishing that I wonder if that’s a viable option), so I will continue to eat meat. Beef is (was) the only conventional meat I eat. No more.

The image of the cow just waiting to die reminded me (literally) of the look on Timone (my deceased Italian Greyhound, my poopsie) when he was extremely ill. At that point, we knew we had no alternative than to put him down. How sad (that’s an understatement) that people could see that cow and not be moved.

What is with the USDA that they could allow this? Honestly, we’re talking about food that millions of people, including children, eat! Do they eat this stuff? Do they feed it to their children? I am appalled enough about the notion of not labeling genetically modified foods or even meat that may be from cloned animals*, but to allow us to each sick animals is horrendous. At least they closed down this plant. I wish we could close down the USDA! Well, maybe not, but at least get it to do the job it’s supposed to do.

*To the best of my knowledge, cloned meat is not (yet) used for human consumption. I don’t know if I’d want to eat cloned meat, but sure as hell know I’d want to make that choice myself!

January 18, 2008

lol cats

One of my favorite sites is http://icanhascheezburger.com/. It’s a fun site with (mainly) cat photos of kitties in various positions and funny captions. My husband and mom-in-law can always tell when I’m looking at this site (as opposed to getting my work done) because of the way I laugh.

Here’s a great one! Do you like MythBusters? Who does this look like???

LOL

December 15, 2007

quick way to print an array in php

Printing arrays in PHP can be maddening if you don’t know the shortcuts! There is always the standard:

foreach ($array as $key => $value)
{
echo $
key.' is key<br>';
echo $value.' is value<br>';
}

but if it’s not an array (and you have error checking on), you’ll get an error:

Warning: Invalid argument supplied for foreach() in /home/username/public_html/file.php on line x

And unfortunately, putting the ‘@’ in front of the ‘foreach’ only yields another error:

Parse error: syntax error, unexpected T_FOREACH in /home/username/public_html/file.php on line x

Of course, you could do a check to see if it *is* an array, but that’s more lines of code, and we want it quick.

Here’s a clever way to get what I call in my Dreamweaver snippets panel a “quick print of array”:

print '<pre>'; print_r($_POST); print '</pre>';

Here’s what it will look like:

Array
(
[asso_key_name_1] => value 1
[asso_key_name_2] => value 2
)

That’s great, but suppose you have several arrays on one page you want to print the results for, how can you keep them apart? Simple! Put the name of the array after the first <pre> tag, like this:

print '<pre>_POST '; print_r($_POST); print '</pre>';

The results will be like this:

_POST Array
(
[asso_key_name_1] => value 1
[asso_key_name_2] => value 2
)

You can use this quick printing of arrays to print POST vars, SESSION vars, recordsets, any kind of PHP array!

« Previous entries · Next entries »