php-general Digest 17 Oct 2008 13:22:19 -0000 Issue 5740

Topics (messages 282016 through 282033):

Re: PHP Dev Facts
        282016 by: Ross McKay
        282017 by: ANR Daemon
        282018 by: Luke Slater
        282019 by: Ashley Sheridan
        282020 by: Larry Garfield
        282021 by: Per Jessen
        282022 by: Lester Caine
        282023 by: Thijs Lensselink
        282024 by: Stut
        282025 by: Jochem Maas
        282026 by: Sancar Saran
        282027 by: Jay Blanchard
        282028 by: Carlos Medina
        282032 by: Tom Shaw
        282033 by: Kyle Terry

Re: Randomiser
        282029 by: Andrew Barnett

Searching MySQL with Japanese chars
        282030 by: robert mena
        282031 by: Eric Butera

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
On Fri, 17 Oct 2008 00:14:18 +0100, Nathan Rixham wrote:

>*Procedural or OOP?*

OOP, except really small stuff.

>*Dev OS*

Fedora 9

>*Dev PHP Version*

5.2.6

>*Live Server OS*

Hosted services - var. Linux, Windows 2003 Server

>*Live Server PHP Version*

Mostly 5.2.3+, some 4.x (haven't looked lately) but I imagine even the
worst of those hosts will upgrade soon, or die.

>*Which HTTP Server Software (+version)?*

Apache 2.2 on Linux, IIS 6.0 on Windows

>*IDE / Dev Environment*

Geany, mostly

>*Preferred Framework(s)?*

Prefer small code libraries over large frameworks. Otherwise, I'd be
writing Java or .NET, eh?

>*Do you Unit Test?*

Yes.

>*Most Used Internal PHP Class*

A MySQL wrapper - needed it for a PITA host once, still easier / lighter
than others (although PDO, adodb interest me)

>*Preferred OS CMS*

Joomla is great, SilverStripe is nicer but I have yet to use it in
anger.

>*Anything else you use frequently in you're PHP'ing that's worth 
>mentioning:*

* iepngfix.htc - lets me use PNG with alpha channels in IE6
* csshover.htc - lets me do pure-CSS fly-out menus
* tinymce - lets me do rich-text editing for admin pages (simple CMS)
* KVM - lets me test in IE6/IE7 without having to reboot into Windows
* Subversion - because I value my time :)
* Meld - because I value my sanity! (graphical diff/merge)
-- 
Ross McKay, Toronto, NSW Australia
"Before enlightenment: chop wood, carry water;
 After enlightenment: chop wood, carry water" - Wu Li

--- End Message ---
--- Begin Message ---
Greetings, Nathan Rixham.
In reply to Your message dated Friday, October 17, 2008, 3:14:18,

> *Procedural or OOP?*

whatever feels applicable.

> *Dev OS*

Win2k, Server 2003

> *Dev PHP Version*

5.2.6

> *Live Server OS*

Whatever.

> *Live Server PHP Version*
5.1.6, 5.2.4, 5.2.6


> *Which HTTP Server Software (+version)?*
Apache all around, 2.2

> *IDE / Dev Environment*
FAR Manager, it's all. farmanager.com

> *Preferred Framework(s)?*
My own, PEAR, Smarty

> *Do you Unit Test?*
If only someone explained it to me... I'd like to do.
But I do use some testing schemes. Don't know how they can be classified.

> *Most Used Internal PHP Class*
Exception?

> *Preferred OS CMS*
????

> *Anything else you use frequently in you're PHP'ing that's worth 
> mentioning:*
Can't live without cygwin. cygwin.com
I should also mention Colorer project, without which it all would be much more
complicated. http://colorer.sf.net/ (Yeah, it is very much complicated itself,
I know...)


-- 
Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>


--- End Message ---
--- Begin Message ---
> On Thu, Oct 16, 2008 at 7:14 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote:
> > Evening All,
> >
> > I'd be /really/ interested to know who uses what!
> >
> > *Procedural or OOP?*
        Procedural

> > *Dev OS*
        Mandriva Linux (home and work)

> > *Dev PHP Version*
        5.2.6
>
> > *Live Server OS*
        Mandriva Linux, Ubuntu 8.04 and Solaris
>
> > *Live Server PHP Version*
        5.2.6
>
> > *Which HTTP Server Software (+version)?*
        Apache 2

> > *IDE / Dev Environment*
        I usually just use VIM. Occasionally I'll use Eclipse.

> > *Preferred Framework(s)?*
        Don't use 'em
> > *Do you Unit Test?*
        eh?
> > *Most Used Internal PHP Class*
        dom


--- End Message ---
--- Begin Message ---
On Fri, 2008-10-17 at 00:14 +0100, Nathan Rixham wrote:
> Evening All,
> 
> I'd be /really/ interested to know who uses what!
> 
> *Procedural or OOP?*
Procedural
> *Dev OS*
Suse 10.3, Fedora 6, Redhat ?, Windows Server 2003
> *Dev PHP Version*
5.2.5 & 4.?
> *Live Server OS*
Suse 10.3, Fedora 6, Redhat ?, Windows Server 2003
> *Live Server PHP Version*
5.2.5 & 4.?
> *Which HTTP Server Software (+version)?*
Apache & IIS
> *IDE / Dev Environment*
Kate
> *Preferred Framework(s)?*
None
> *Do you Unit Test?*
No
> *Most Used Internal PHP Class*
SimpleXML
> *Preferred OS CMS*
generally build custom ones for jobs
> *Anything else you use frequently in you're PHP'ing that's worth 
> mentioning:*
> 
> ps: I'm not asking for any kind of research project, just interested and 
> interested to know what's most common + might learn something/find some 
> new tools/toys!
> 
> pps: will reply myself as well but if I do here it'll make your 
> intertwined replies messy!
> 
> Many Regards
> 
> Nathan
> 


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
On Thursday 16 October 2008 6:14:18 pm Nathan Rixham wrote:
> Evening All,
>
> I'd be /really/ interested to know who uses what!
>
> *Procedural or OOP?*

Right tool for the job.  I'm comfortable in either.  Most of my work these 
days is in a large open source procedural framework, but I'm slowly working 
more and more OOP into it. :-)

> *Dev OS*

Kubuntu Hardy.

> *Dev PHP Version*

5.2.4

> *Live Server OS*

For my personal stuff, hosted FreeBSD.  At my company, we use a web host 
that's running either RHEL or Fedora.  (I honestly forget which.)

> *Live Server PHP Version*

5.2.6

> *Which HTTP Server Software (+version)?*

Apache 2 in most places, but I think a few may be running 1.3 for no good 
reason.

> *IDE / Dev Environment*

Zend Studio 5.5 is the only IDE I can actually say I like.  More recent 
versions of Eclipse / Eclipse PDT at least don't suck as much as they used 
to, which is the only good thing I can say about any of 'em.

> *Preferred Framework(s)?*

98% of my PHP is written on, for, and with Drupal. :-)

> *Do you Unit Test?*

For internal framework stuff (where I can do proper TDD), extensively.  For 
day to day for clients, not all that much.  Most of that work is not really 
unit-testable to begin with, and functional tests are considerably harder to 
do at this point in Drupal.  (Although that is improving.)

> *Most Used Internal PHP Class*

PDO, probably, since I build the new Drupal DB layer on top of it.  However, I 
am a huge huge fan of ArrayAccess, simply for its cool factor.

> *Preferred OS CMS*

Drupal (surprise surprise).

> *Anything else you use frequently in you're PHP'ing that's worth
> mentioning:*

Don't underestimate the power of associative arrays.  You can get some really 
deep, really powerful, really fast data structures with a little care and an 
embracing of associative arrays.

> ps: I'm not asking for any kind of research project, just interested and
> interested to know what's most common + might learn something/find some
> new tools/toys!
>
> pps: will reply myself as well but if I do here it'll make your
> intertwined replies messy!
>
> Many Regards
>
> Nathan



-- 
Larry Garfield
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
On Fri, 2008-10-17 at 00:14 +0100, Nathan Rixham wrote:
> Evening All,
> 
> I'd be really interested to know who uses what!
> 
> *Procedural or OOP?*
Procedural
> *Dev OS*
opensuse 11.0
> *Dev PHP Version*
5.2.5 & 4.3.8-9-10-11
> *Live Server OS*
opensuse 10.1, 10.2, 10.3, 11.0, 8.2, 9.1
> *Live Server PHP Version*
5.2.5 & 4.3.8-9-10-11
> *Which HTTP Server Software (+version)?*
Apache 2.0 and 2.2
> *IDE / Dev Environment*
Kate, vi
> *Preferred Framework(s)?*
None
> *Do you Unit Test?*
Not really
> *Most Used Internal PHP Class*
None
> *Preferred OS CMS*
None
> *Anything else you use frequently in you're PHP'ing that's worth 
> mentioning:*

I use the XSLT stuff a lot - very fast for doing XSL transforms. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
Evening All,

I'd be /really/ interested to know who uses what!

*Procedural or OOP?*
Mainly OOP nowadays

*Dev OS*
'Eclipse'
So I can run transparently on Windows or Linux depending on the customer site

*Dev PHP Version*
In limbo at present awaiting sorting out of windows snapshots :(

*Live Server OS*
Various Windows + Mandriva Linux on sites where the windows bind has been 
removed!

*Live Server PHP Version*
PHP5.2.6

*Which HTTP Server Software (+version)?*
Apache 2.2.8

*IDE / Dev Environment*
Eclipse + PHPEclipse ( STILL better than PDT in my opinion )
I also run all of the documentation and legacy C code through Eclipse. The only thing I don't do with it is Java ;)

*Preferred Framework(s)?*
ADOdb + Smarty through bitweaver

*Do you Unit Test?*
Not as much as I probably should

*Most Used Internal PHP Class*
No idea - most would be wrapped in something else

*Preferred OS CMS*
bitweaver but I'm not sure where 'OS' comes into it?

*Anything else you use frequently in you're PHP'ing that's worth mentioning:*
phpdoc to produce very useful cross reference information on packages

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
Quoting Nathan Rixham <[EMAIL PROTECTED]>:

Evening All,

I'd be /really/ interested to know who uses what!

*Procedural or OOP?*

OO


*Dev OS*

Ubuntu / Windows XP


*Dev PHP Version*

5.2.6


*Live Server OS*

Debian / Suse


*Live Server PHP Version*

5.2.6


*Which HTTP Server Software (+version)?*

Apache 2


*IDE / Dev Environment*

Zend Studio for Eclipse


*Preferred Framework(s)?*

Zend Framework / Symfony


*Do you Unit Test?*

Sometimes


*Most Used Internal PHP Class*

*Preferred OS CMS*

*Anything else you use frequently in you're PHP'ing that's worth mentioning:*

SVN


ps: I'm not asking for any kind of research project, just interested
and interested to know what's most common + might learn something/find
some new tools/toys!

pps: will reply myself as well but if I do here it'll make your
intertwined replies messy!

Many Regards

Nathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
On 17 Oct 2008, at 00:14, Nathan Rixham wrote:
I'd be /really/ interested to know who uses what!

*Procedural or OOP?*

My standard architecture is OOP with procedural controllers.

*Dev OS*

OSX.

*Dev PHP Version*

5.2.6

*Live Server OS*

CentOS and FreeBSD.

*Live Server PHP Version*

5.2.6

*Which HTTP Server Software (+version)?*

LoadBalancer: nginx
Static servers: lighttpd
App servers: Apache 2

*IDE / Dev Environment*

Netbeans, Aptana, TextMate and vi.

*Preferred Framework(s)?*

Home-grown every time.

*Do you Unit Test?*

Yes.

*Most Used Internal PHP Class*

MySQLi.

*Preferred OS CMS*

Wordpress.

*Anything else you use frequently in you're PHP'ing that's worth mentioning:*

Git, MySQL, Memcache and Gearman.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Nathan Rixham schreef:
> Evening All,
> 
> I'd be /really/ interested to know who uses what!
> 
> *Procedural or OOP?*

mostly OOP with a smattering of helper functions.
small CLI scripts are often procedural.

> 
> *Dev OS*

Mac OS X Leopard (with winXP VM)

> 
> *Dev PHP Version*

daily dev 5.2.6
I also run various alphas of other version (e.g. 5.3) for
testing/playing

> 
> *Live Server OS*

Debian, Redhat

> *Live Server PHP Version*

5.1.2 thru 5.2.6 ... coding defensively and conservatively generally
means that there are no problems developing on 5.2.6 and rolling out on
5.1.2 but I try to avoid it.

> *Which HTTP Server Software (+version)?*

Apache2.x (some projects run on Apache1.3.x ... but I don't really feel the 
difference)

> *IDE / Dev Environment*

Zend Studio
Zend Eclipse
Eclipse with PDT/Aptana
Terminal.app (bash)
nano (shell editor)
TextWrangler
TextEdit (winXP)

> *Preferred Framework(s)?*

I eat my own dogfood. I like the look of code in ZendFramework but the
whole library thang I find rather intrusive ... if I find something in a
framework I really need/want I generally strip it out - doing away with
everything I don't need, making it conform more to the project in question
and using the 'refactor time' as an excuse to understand the details of
the code in question ... this all assumes that the framework in question
allows for this kind of thing (I always leave in the relevant author 
attributions, etc)

> *Do you Unit Test?*

not really, but I generally develop in a unit-testy kind of way, I write
code that is known to fail because it relies on as yet unwritten code ... I run
it to check it fails as expected then iteratively add required, unwritten code,
checking at each step to see it fail in a new, exzpected way then add the next 
piece
until Im left with the end result.

I really should get into unit testing, deadlines, lack of budget and general
intertia always seem to get in the way ... I must do better :-/

> *Most Used Internal PHP Class*

Exception. I also use Iterator & related interfaces quite a bit.

> *Preferred OS CMS*

er? I'll hack anything if I have to. but I don't really have a preference,
never really found anything that satisfies my desire for clean, understandable
code. the usual suspects are all somewhat familiar to me but I wouldn't call 
them
friends.

I want to take a look the new typo3 engine ... it seems very ambitious and
Im interested in the potential for a generic workflow engine.

> *Anything else you use frequently in you're PHP'ing that's worth
> mentioning:*

I use APC quite a bit, play with memcache when I can. and I use firebird
(which is a right can of worms atm with regard to the status quo of the php
extension ... as a DB firebird is very cool).

phpmailer often makes an appearance in projects - I find it to be a very simple,
quick wrapper for handling web-originated emails (not bulk mailing though ... I 
use
mimemail class with tyhe qmail extension for that generally).

Sphinx searchd/indexer is what I'm currently getting to grips with ... other 
than
the basic configuration and figuring out how to managably work with delta 
updates
Im scratching my head as to how to manage sphinx search/indexing for multiple, 
small
sites on a single server.

oh ... I also frequently use this list as a stress-relief mechanism ;-)

> ps: I'm not asking for any kind of research project, just interested and
> interested to know what's most common + might learn something/find some
> new tools/toys!
> 
> pps: will reply myself as well but if I do here it'll make your
> intertwined replies messy!
> 
> Many Regards
> 
> Nathan
> 


--- End Message ---
--- Begin Message ---
On Friday 17 October 2008 02:14:18 Nathan Rixham wrote:
> Evening All,
>
> I'd be /really/ interested to know who uses what!
>
> *Procedural or OOP?*
Procedural in design. And code a bit different. I'm groupping my functions 
under classes like util, user, session etc. Each function is public static. 
also I got some public static arrays and strings. like k5::$config etc.
This gives me some kind of name space and prevent any kind of variable chrash.

> *Dev OS*
Kubuntu 
> *Dev PHP Version*
5.2 
> *Live Server OS*
Centos, RHEL, Debian
> *Live Server PHP Version*
4, 5.1, 5.2
> *Which HTTP Server Software (+version)?*
Apache 1.3 2.0 2.2
> *IDE / Dev Environment*
Kate, Eclipse, 
> *Preferred Framework(s)?*
nope
> *Do you Unit Test?*
what ?
> *Most Used Internal PHP Class*
simple xml, 
> *Preferred OS CMS*
Must use TYPO3, have own CMS/Framework 
> *Anything else you use frequently in you're PHP'ing that's worth
> mentioning:*
Using PHP array format for storing data to generate greater benefit opcode 
cache.
I'm using inline coding format for templates. Much faster than traditional 
search and replace model and with opcode cache even more faster.
> ps: I'm not asking for any kind of research project, just interested and
> interested to know what's most common + might learn something/find some
> new tools/toys!
>
> pps: will reply myself as well but if I do here it'll make your
> intertwined replies messy!
>
> Many Regards
>
> Nathan


Regards
Sancar

--- End Message ---
--- Begin Message ---
[snip]
*Procedural or OOP?*
Mix - depends on the job to be done
*Dev OS*
SUSe Linux
*Dev PHP Version*
5.n
*Live Server OS*
SUSe Linux
*Live Server PHP Version*
5.n
*Which HTTP Server Software (+version)?*
Apache 2.n
*IDE / Dev Environment*
Eclipse / Zend
*Preferred Framework(s)?*
none
*Do you Unit Test?*
yes
*Most Used Internal PHP Class*
Hmmmm.....I do not think we have a most used or if we do the margin is
very small
*Preferred OS CMS*
none
*Anything else you use frequently in you're PHP'ing that's worth 
mentioning:*
Zend Platform
[/snip]

--- End Message ---
--- Begin Message ---
[snip]
*Procedural or OOP?*
depends on the job to be done
*Dev OS*
unix or derivate
*Dev PHP Version*
>= 5
*Live Server OS*
unix or derivate
*Live Server PHP Version*
>= 5
*Which HTTP Server Software (+version)?*
Apache >= 2
*IDE / Dev Environment*
PHPEd/Net Beans
*Preferred Framework(s)?*
Zend Framework, EzComponents
*Do you Unit Test?*
yes
*Most Used Internal PHP Class*
echo! No.. i dont know
*Preferred OS CMS*
SimplyContent()
*Anything else you use frequently in you're PHP'ing that's worth
mentioning:*
none
[/snip]

--- End Message ---
--- Begin Message ---
Here's mine.

*Procedural or OOP?*

Both, even when I'm doing procedural stuff at the very least I'll have a
classes directory/autoloader function where I have OOP API's to assist in
the design.

*Dev OS*

At home windows vista. At work Linux Slackware.

*Dev PHP Version*

PHP 5.2.5. I would run ladder versions But there's problems with the
Postgres drivers on PHP 5.2.6/7 5.3 alpha.

*Live Server OS*

Linux

*Live Server PHP Version*

5.1.2

*Which HTTP Server Software (+version)?*

Apache 2

*IDE / Dev Environment*

Zend Studio for Linux or Windows always.

*Preferred Framework(s)?*

Zend Framework R0ckz. Definitely preferred to say the least :) Cake is cool
programming wise. Usability wise I run for my life.

*Do you Unit Test?*

Not really.

*Most Used Internal PHP Class*

Pdo_mysql/pgsql. 
*Preferred OS CMS*

Joomla.

Tom Shaw
[EMAIL PROTECTED]

"When one door closes, another opens; but we often look so long and so
regretfully upon the closed door that we do not see the one which has opened
for us."   Alexander Graham Bell

-----Original Message-----
From: Nathan Rixham [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 16, 2008 6:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Dev Facts

Evening All,

I'd be /really/ interested to know who uses what!

*Procedural or OOP?*

*Dev OS*

*Dev PHP Version*

*Live Server OS*

*Live Server PHP Version*

*Which HTTP Server Software (+version)?*

*IDE / Dev Environment*

*Preferred Framework(s)?*

*Do you Unit Test?*

*Most Used Internal PHP Class*

*Preferred OS CMS*

*Anything else you use frequently in you're PHP'ing that's worth 
mentioning:*

ps: I'm not asking for any kind of research project, just interested and 
interested to know what's most common + might learn something/find some 
new tools/toys!

pps: will reply myself as well but if I do here it'll make your 
intertwined replies messy!

Many Regards

Nathan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
*Procedural or OOP?*
Both depending on the scale of the project.

*Dev OS*
Usually Debian 4

*Dev PHP Version*
5.2.6

*Live Server OS*
Client's choice. For my full time job I write for CentOS 5 and Debian based
OSs.

*Live Server PHP Version*
5.2.6 - It doesn't make sense to program in a version you're not deploying
to.

*Which HTTP Server Software (+version)?*
Apache 2 and Nginx

*IDE / Dev Environment*
Gedit for Debian.

*Preferred Framework(s)?*
Cake is alright

*Do you Unit Test?*
Yes, at my full time job.

*Most Used Internal PHP Class*
Mysqli

*Anything else you use frequently in you're PHP'ing that's worth
mentioning:*
nope.

On Fri, Oct 17, 2008 at 6:12 AM, Tom Shaw <[EMAIL PROTECTED]> wrote:

> Here's mine.
>
> *Procedural or OOP?*
>
> Both, even when I'm doing procedural stuff at the very least I'll have a
> classes directory/autoloader function where I have OOP API's to assist in
> the design.
>
> *Dev OS*
>
> At home windows vista. At work Linux Slackware.
>
> *Dev PHP Version*
>
> PHP 5.2.5. I would run ladder versions But there's problems with the
> Postgres drivers on PHP 5.2.6/7 5.3 alpha.
>
> *Live Server OS*
>
> Linux
>
> *Live Server PHP Version*
>
> 5.1.2
>
> *Which HTTP Server Software (+version)?*
>
> Apache 2
>
> *IDE / Dev Environment*
>
> Zend Studio for Linux or Windows always.
>
> *Preferred Framework(s)?*
>
> Zend Framework R0ckz. Definitely preferred to say the least :) Cake is cool
> programming wise. Usability wise I run for my life.
>
> *Do you Unit Test?*
>
> Not really.
>
> *Most Used Internal PHP Class*
>
> Pdo_mysql/pgsql.
> *Preferred OS CMS*
>
> Joomla.
>
> Tom Shaw
> [EMAIL PROTECTED]
>
> "When one door closes, another opens; but we often look so long and so
> regretfully upon the closed door that we do not see the one which has
> opened
> for us."   Alexander Graham Bell
>
> -----Original Message-----
> From: Nathan Rixham [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 16, 2008 6:14 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP Dev Facts
>
> Evening All,
>
> I'd be /really/ interested to know who uses what!
>
> *Procedural or OOP?*
>
> *Dev OS*
>
> *Dev PHP Version*
>
> *Live Server OS*
>
> *Live Server PHP Version*
>
> *Which HTTP Server Software (+version)?*
>
> *IDE / Dev Environment*
>
> *Preferred Framework(s)?*
>
> *Do you Unit Test?*
>
> *Most Used Internal PHP Class*
>
> *Preferred OS CMS*
>
> *Anything else you use frequently in you're PHP'ing that's worth
> mentioning:*
>
> ps: I'm not asking for any kind of research project, just interested and
> interested to know what's most common + might learn something/find some
> new tools/toys!
>
> pps: will reply myself as well but if I do here it'll make your
> intertwined replies messy!
>
> Many Regards
>
> Nathan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Kyle Terry | www.kyleterry.com

--- End Message ---
--- Begin Message ---
I ended up using an example from the PHP website.

<?php
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$rand_keys = array_rand($input, 2);
echo $input[$rand_keys[0]] . "\n";
echo $input[$rand_keys[1]] . "\n";
?>

Just extended the array to the number of lines I needed.

Andrew

--- End Message ---
--- Begin Message ---
Hi,
I am developing my first application that will have to handle with japanese
data stored in a MySQL database.  After digging a while it seems that I'd
have to set all pieces (from the charset of the apache,  to the encoding of
the templates and database fields) set to UTF-8.

I'd like to know if there is something special that I have to be aware when
doing searches.  I am not sure that this is more related to PHP or MySQL
itself so before sending to them (MySQL list) I'd like to hear from you.

Thanks.

--- End Message ---
--- Begin Message ---
On Fri, Oct 17, 2008 at 8:22 AM, robert mena <[EMAIL PROTECTED]> wrote:
> Hi,
> I am developing my first application that will have to handle with japanese
> data stored in a MySQL database.  After digging a while it seems that I'd
> have to set all pieces (from the charset of the apache,  to the encoding of
> the templates and database fields) set to UTF-8.
>
> I'd like to know if there is something special that I have to be aware when
> doing searches.  I am not sure that this is more related to PHP or MySQL
> itself so before sending to them (MySQL list) I'd like to hear from you.
>
> Thanks.
>

Make sure your character collation is utf also as that is exactly what
it's for.  You might need to use something like mysql_set_charset().
You'll need something like this also:

header('Content-Type: text/html; charset=utf-8');

The reason I say this is because however you put your data in is how
you need to search on it.  So if you inject utf8 into a latin1 db
you're going to have a hard time in the future.  Other than that
everything else should just work fine.

--- End Message ---

Reply via email to