Jun
25
2006
0

Single and double quotes in PHP

I don’t know why this took me so long, but I just discovered that in PHP, there is a difference between double and single quotes. For example, the two variables below actually behave slightly differently:

$var1 = 'string\\t1';
$var2 = "string\\t2";

echo $var1; would produce string\t1, whereas
echo $var2; produces string 2 — with a tab character between the ‘g’ and the ‘2’.

Taking things further, the code below:

$myvar = 'text';
echo 'variable: $myvar';
echo "\\n";
echo "variable: $myvar";

would output the following:

variable: $myvar
variable: text

So it seems that single quotes will output their contents literally, but double quotes are further processed before being outputted.

Written by Mark in: PHP/JavaScript |
Jun
24
2006
8

It’s that time again!

Yes, it’s time to dust off the trusty text editor and get editing all those lovely files whose names are acronyms: HTML, CSS, PHP (and .htaccess, but don’t worry too much about that one).

I’m having a redesign!

This theme has been in development for ages, on my local install, and it’s now time to roll it out and make more edits live. I love making edits live, it’s so exciting, no? Anyways, it’ll be fixed up by the end of the day, and I’m also happy to announce the imminent return of stories, articles and poems, hooray!

Now is the time to submit feedback about the new look, because after a while I will have forgotten how the CSS works and then it will be too late.

Written by Mark in: Site News |
Jun
23
2006
0

Bath Thermae Spa

A while ago I blogged about Bath Thermae Spa, the pointless project which has been a thorn in the side of BANES county council since, well, for ever it seems. Wikipedia, accessed on 22 June 2006, had this to say about it:

Originally planned to open in 2002, and despite a formal opening with the aid of the “Three Tenors” in 2003, the project is seriously behind schedule and over budget for several reasons. According to Bath and North East Somerset, the originally budgeted cost of £13.5 million will rise to £35.7 million, and there have been lengthy legal disputes with contractors. Further, the wrong paint was applied to the main pool and cost a further £4 million to remedy.

The official website states that the outstanding building work on the Spa will be completed in July 2006, but no revised opening date has yet been announced.

Can you imagine?!

Anyway, mum and I went walking the dog the other day, and near to the woods we saw a public convenience which had been chained shut. There was a notice which said that the toilets were now closed and underneath someone had written, “to pay for the bloody Spa”.

Written by Mark in: All and sundry |
Jun
22
2006
0

Fascinating post about language changes

… the losses that matter are semantic losses, not grammatical losses

From Begging the Question

How beautifully sane!

Written by Mark in: Being fussy about language, Links |
Jun
22
2006
8

Headset joy

Earlier this week, a headset was installed on the phone in reception. This means that one may talk freely on the phone, whilst having both hands available for, for example, typing and other sundry office tasks.

Continuing the theme of being astonished by encounters with mildly interesting electronic office equipment, I took a photo of myself wearing the fore-mentioned apparel.

Me wearing a telephone headset.

Space age!

Written by Mark in: Photos |
Jun
21
2006
1

Who does this look like?

My sister has a cuddly toy that’s a sheep. She picked it up the other night, and asked me who I thought it looked like. Puzzled, I replied that I didn’t think it looked like anybody, what are you talking about?

Then she said, “out of the Big Brother house” and the penny dropped. Check it out, it totally looks like him!

Photograph of a cuddly toy -- it's a sheep!

Glynn, if you’re reading, we do love you, really, we do!

Written by Mark in: Big Brother 2006, Photos |
Jun
20
2006
2

Today I was delighted by a photocopier

That’s right folks, read it again — I was delighted by a photocopier.

Just had to make 5 copies of a 5 sheet document, and I put them into the feed place in the copier. The machine swished them all through really quickly, and then printed out the pages in the right order. Then, in a stroke of brilliance, it stacked each set at right angles!

I was actually delighted to see technology working like that! I felt like an old person who’s just seen the speed of email or something.

It was an awakening.

Written by Mark in: All and sundry, Greatest Hits |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes