You are here: Re: arrays -- can they be words, not bytes? « PHP Programming Language « IT news, forums, messages
Re: arrays -- can they be words, not bytes?

Posted by Lars Eighner on 10/17/07 21:55

In our last episode, <13hcvt7td63bhcd@corp.supernews.com>, the lovely and
talented Bint broadcast on comp.lang.php:

> Well, let me ask you. I've got the code working now, using the method I
> described above. But just for my edification, how do I know if I am working
> with strings or arrays?

> The thing begins as a POST incoming variable, say $image.
> Then if I start accessing elements of it, ie $image[0], $image[1], etc, then
> am I accessing string elements?
> And if I make a *new* entity, say $output, and start saying things like
> $output[0] = ord($image[0]) + (ord($image[1])<<8), then am I creating a
> string there, or an array?

You are creating an array. ord returns an integer.

--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 460 days to go.
What do you do when you're debranded?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация