Simple change :
mysql_fetch_object
to :
mysql_fetch_array or
mysql_fetch_row
By default, mysql_fetch_array will allow for :
$row[2] and $row['fieldname']
And mysql_fetch_row will allow for :
$row[2]
And as you know, mysql_fetch_object allows for :
$row->fieldname
Oh, that works wonders and for the first time in 24 hours I am
smiling! One more
thing to make it complete. Is there a way to loop through the display of
that array?
In other words, I now have an array called $new_data and can call each
element in
the array by doing $new_data[0], etc, but I n
pgpSkuPbKbfsy.pgp
Description: PGP signature
cybermalandro cybermalandro wrote:
So, I have an array that looks like this
rray(3) {
[0]=>
array(8) {
["line"]=>
string(1) "1"
["ponbr"]=>
string(5) "34474"
["emt"]=>
string(3) "yes"
["qty"]=>
string(1) "5"
["price"]=>
string(2) "19"
["shipdate"
Well I don't want have to specify $val['ponbr'] == 'TEST1' I want to say if
($val['ponbr'] == repeated value) then $resultArray[$key] = $val;
In other words I want to go through the array matched the values of ponbr
that repeat or are the same so if they match then I put the results in
another arr
"Dale Hersh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a question regarding the count function. Here goes:
>
> Lets pretend I have this array called myStuff. If I add two elements to
> myStuff and call the count function, I will get a result of 2. My question
> is how do
Mark Pelillo wrote:
> I am a Newbie at PHP
>
> I am sure I am missing something small but...
>
> I am trying to create a form selection box which an alphabetically sort
> list of a unix group file.
>
> The group file has the format groupname::groupnumber:
>
> I have tried to create an array usi
You wrote:
> Also, consider using print or echo as opposed to printf. And lastly,
you
> really don't need to use mysql_free_result, PHP does this
automagically
> after the script dies. Sorry for picking on you, you may have your
> reasons. ;-)
Really? Then why was it that, when I neglected to
perhaps i'm misunderstanding you, but why not use a for loop?
for($i=0;$imailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 10:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] re: array question
Oh, that works wonders and for the first time in 24 hours I am
smiling! One more
thing to
e-
>From: Scott [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, September 18, 2001 10:11 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] re: array question
>
>
>Oh, that works wonders and for the first time in 24 hours I am
>smiling! One more
>thing to make it complete. Is the
= $value";
}
- Original Message -
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Scott" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, September 18, 2001 7:29 PM
Subject: RE: [PHP] re: array question
> perhaps i'm misunderstanding you,
;[EMAIL PROTECTED]>
>To: "Scott" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Tuesday, September 18, 2001 7:29 PM
>Subject: RE: [PHP] re: array question
>
>
> > perhaps i'm misunderstanding you, but why not use a for loop?
> >
> > fo
If you want to store all the values in the array in one variable (just as a
string with delimiters maybe?) Try this:
foreach ($array as $value) {
$temp .= $value . "|";
}
Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]
Searching for a new IT solution for your company? Need to improve
On Wed, 19 Sep 2001 12:28, Scott wrote:
> That works, thank you, but it prints at the top of my page, is there
> a way to store that array into a single variable?
>
Yes - implode()
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders Uni
Thank YOU! It worked wonderful, I used a blank to separate the
content like this: $displn = implode("",$new_data);
Thank you again and thank you to everyone for helping me through this!
At 01:15 PM 9/19/2001 +0930, David Robley wrote:
>On Wed, 19 Sep 2001 12:28, Scott wrote:
> > That works, t
cybermalandro cybermalandro wrote:
Let me try this again. I want to take an array that may look like this
Opening new Threads over and over don't do any good.
Please stick to your opened thread about that issue please.
Greets
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_
16 matches
Mail list logo