Re: numeric string to single digit array
| From: | Richard Dunne | Date: | Wed, 26 Mar 2008 15:00:15 +0000 |
| Subject: | Re: numeric string to single digit array | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-44801@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: Chris <dmagick@gmail.com>
Date: Wednesday, March 26, 2008 2:18 am
Subject: Re: [PHP-DB] numeric string to single digit array
> Richard Dunne wrote:
> > Sorry for the top-posting, it's my mail client, not my design.
> I honestly have not even looked at myphpadmin much, using the CLI
> mostly.
>
> It's easy enough to click to another place in your mail client ;)
>
> So what happens when you run that query manually?
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
I ran this
$query ="Select answer from answers where studentID ='A123456789'";
$result = mysql_query($query,$connection);
$resultArray = str_split($result,1);
$count = count($resultArray);
As I have two rows in my table, count should, at least I hope, return a value of two, but it
doesn't. It returns 1. From what I can assertain, str_split is seeing a two digit number and
not splitting it into two single digit numbers.