Re: [PHP-DB] numeric string to single digit array

[email protected] (Richard Dunne)
Newsgroups php.db
Message-ID <[email protected]>
----- Original Message -----
From: Chris <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.