On Mon, Feb 25, 2013 at 9:51 PM, Karl DeSaulniers k...@designdrumm.com wrote:
Never mind. I found a different function that reads out the children as well
into the array.
function xml_parse_into_assoc($data) {
$p = xml_parser_create();
On Feb 26, 2013, at 10:35 PM, tamouse mailing lists wrote:
On Mon, Feb 25, 2013 at 9:51 PM, Karl DeSaulniers k...@designdrumm.com
wrote:
Never mind. I found a different function that reads out the
children as well
into the array.
function xml_parse_into_assoc($data) {
Hi Guys/Gals,
If I have an multidimensional array and it has items that have the
same name in it, how do I get the values of each similar item?
EG:
specialservices = array(
specialservice = array(
serviceid = 1,
servicename= signature required,
On Mon, Feb 25, 2013 at 8:40 PM, Karl DeSaulniers k...@designdrumm.com wrote:
Hi Guys/Gals,
If I have an multidimensional array and it has items that have the same name
in it, how do I get the values of each similar item?
EG:
specialservices = array(
specialservice = array(
On 02/25/2013 05:40 PM, Karl DeSaulniers wrote:
Hi Guys/Gals,
If I have an multidimensional array and it has items that have the same
name in it, how do I get the values of each similar item?
EG:
specialservices = array(
specialservice = array(
serviceid = 1,
servicename= signature required,
On Feb 25, 2013, at 7:48 PM, Adam Richardson wrote:
On Mon, Feb 25, 2013 at 8:40 PM, Karl DeSaulniers k...@designdrumm.com
wrote:
Hi Guys/Gals,
If I have an multidimensional array and it has items that have the
same name
in it, how do I get the values of each similar item?
EG:
On Feb 25, 2013, at 7:50 PM, Jim Lucas wrote:
On 02/25/2013 05:40 PM, Karl DeSaulniers wrote:
Hi Guys/Gals,
If I have an multidimensional array and it has items that have the
same
name in it, how do I get the values of each similar item?
EG:
specialservices = array(
specialservice =
Never mind. I found a different function that reads out the children
as well into the array.
function xml_parse_into_assoc($data) {
$p = xml_parser_create();
xml_parser_set_option($p,
On 2/7/12 1:50 PM, Micky Hulse wrote:
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
I just did a few quick tests:
https://gist.github.com/1761490
... and it looks like having that comma ain't no big deal.
I can't believe that I
On 12-02-07 02:50 PM, Micky Hulse wrote:
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
I just did a few quick tests:
https://gist.github.com/1761490
... and it looks like having that comma ain't no big deal.
I can't believe that I
On Wed, Feb 8, 2012 at 9:58 AM, Larry Garfield la...@garfieldtech.com wrote:
Drupal's coding standards encourage the extra trailing comma on multi-line
arrays, for all the readability and editability benefits that others have
mentioned. We have for years. Cool stuff. :-)
Yah, I love that
On Wed, Feb 8, 2012 at 10:08 AM, Robert Cummings rob...@interjinn.com wrote:
JavaScript in Internet Crapsplorer spanks you on the bottom every time you
have a trailing comma in a JS array. That may be where you picked up the
aversion.
On Wed, Feb 8, 2012 at 10:10 AM, Micky Hulse
On 12-02-08 01:12 PM, Micky Hulse wrote:
On Wed, Feb 8, 2012 at 10:08 AM, Robert Cummingsrob...@interjinn.com wrote:
JavaScript in Internet Crapsplorer spanks you on the bottom every time you
have a trailing comma in a JS array. That may be where you picked up the
aversion.
On Wed, Feb 8,
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
I just did a few quick tests:
https://gist.github.com/1761490
... and it looks like having that comma ain't no big deal.
I can't believe that I always thought that having the trailing
On Tue, 2012-02-07 at 11:50 -0800, Micky Hulse wrote:
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
I just did a few quick tests:
https://gist.github.com/1761490
... and it looks like having that comma ain't no big deal.
I
On Tue, Feb 07, 2012 at 11:50:45AM -0800, Micky Hulse wrote:
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
I just did a few quick tests:
https://gist.github.com/1761490
... and it looks like having that comma ain't no big
Hi Ashley! Thanks for your quick and informative reply, I really
appreciate it. :)
On Tue, Feb 7, 2012 at 12:10 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
It's easy to add and remove elements without making sure you have to check
the trailing comma. It's also OK in Javascript to use
On Tue, 2012-02-07 at 15:15 -0500, Paul M Foster wrote:
On Tue, Feb 07, 2012 at 11:50:45AM -0800, Micky Hulse wrote:
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
I just did a few quick tests:
On Tue, Feb 7, 2012 at 12:15 PM, Paul M Foster pa...@quillandmouse.com wrote:
I've always avoided trailing array commas, but only because I was under
the impression that leaving one there would append a blank array member
to the array, where it might be problematic. Yes? No?
Yah, ditto! :D
In
On Tue, Feb 7, 2012 at 12:19 PM, Micky Hulse rgmi...@gmail.com wrote:
Yah, ditto! :D
$s = 'foo,bar,';
print_r(explode(',', $s));
The output is:
Array
(
[0] = foo
[1] = bar
[2] =
)
That's one instance where I know you have to be cautious about the
trailing delimiter.
I know, this
On 2/7/12 13:15, Paul M Foster pa...@quillandmouse.com wrote:
I've always avoided trailing array commas, but only because I was under
the impression that leaving one there would append a blank array member
to the array, where it might be problematic. Yes? No?
Nope. In fact, it's officially
On Tue, 2012-02-07 at 12:26 -0800, Micky Hulse wrote:
On Tue, Feb 7, 2012 at 12:19 PM, Micky Hulse rgmi...@gmail.com wrote:
Yah, ditto! :D
$s = 'foo,bar,';
print_r(explode(',', $s));
The output is:
Array
(
[0] = foo
[1] = bar
[2] =
)
That's one instance where I
On Tue, Feb 7, 2012 at 12:32 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
That's because it's not an array you've got the trailing delimiter on, it's a
string.
Right. Sorry, bad example.
it was just the one example I could think of where you could get an
empty element at the end of
On Wed, Feb 8, 2012 at 4:10 AM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On Tue, 2012-02-07 at 11:50 -0800, Micky Hulse wrote:
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
...
It's fine in PHP, and some coding practices
Hi folks,
I have an array that looks a little something like this:
Array ( [6] = 43.712608, -79.360092 [7] = 43.674088, -79.388557 [8]
= 43.674088, -79.388557 [9] = 43.704666, -79.397873 [10] =
43.674393, -79.372147 )
but after I pass it to a function, it loses it's indexing and becomes:
Array
On Fri, 2010-07-09 at 15:55 -0400, Marc Guay wrote:
Hi folks,
I have an array that looks a little something like this:
Array ( [6] = 43.712608, -79.360092 [7] = 43.674088, -79.388557 [8]
= 43.674088, -79.388557 [9] = 43.704666, -79.397873 [10] =
43.674393, -79.372147 )
but after I
My bad, I had some leftover code running array_values() on it before
it got passed.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Happy New Year, here's my first question of the year (and it's only 15 hours
into the year!).
I am creating a small database management tool for my a website (my work IP
blocks my access to PhpMyAdmin) and I don't want to install any additional
software.
I am working on adding rows and need to
I think the problem is here:
echo 'input type=' . $input_type . ' ';
[...snip...]
elseif ($input_type == 'textarea')
{
echo 'rows=7 cols=30 ';
echo 'value=';
if ($field['null'] == 'YES') // CAN BE NULL?
{
echo 'NULL';
}
echo ' ';
}
because to
On Jan 29, 2009, at 6:07 PM, Eric Butera eric.but...@gmail.com wrote:
On Thu, Jan 29, 2009 at 9:02 PM, Paul M Foster pa...@quillandmouse.com
wrote:
On Fri, Jan 30, 2009 at 11:10:16AM +1100, Clancy wrote:
snip
As a former assembly language programmer I have some idea of the
vast
amount of
-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: Thursday, January 29, 2009 8:02 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: Hidden costs of PHP arrays?
On Fri, Jan 30, 2009 at 11:10:16AM +1100, Clancy wrote:
snip
As a former assembly
On Wed, 28 Jan 2009 00:50:18 +, nrix...@gmail.com (Nathan Rixham) wrote:
Clancy wrote:
Also what the relative virtues of defining the same set of fields for every
contact, as
against either defining only the fields which actually hold values, as in
the following
examples?
a:
Clancy wrote:
One could reasonably hope that the same could be said for every part of the
programming
chain, but it is one of the ironies of modern computing that computers get
faster and
faster, memory gets cheaper and cheaper, programming appears to get simpler
and simpler,
yet the
On Fri, Jan 30, 2009 at 11:10:16AM +1100, Clancy wrote:
snip
As a former assembly language programmer I have some idea of the vast
amount of thumb
twiddling which is going on behind-the-scenes when I make some apparently
simple request
like the one to get my phone number. Undoubtedly most
On Thu, Jan 29, 2009 at 9:02 PM, Paul M Foster pa...@quillandmouse.com wrote:
On Fri, Jan 30, 2009 at 11:10:16AM +1100, Clancy wrote:
snip
As a former assembly language programmer I have some idea of the vast
amount of thumb
twiddling which is going on behind-the-scenes when I make some
PHP arrays permit extremely concise programming; for example if I have all my
contacts in
an array $contacts, I can write:
$my_phone_no = $contacts['clancy']['phone'];
However it is clear that there must be a lot going on behind the scenes to
achieve this
simple result, as it requires some
2009/1/28 Clancy clanc...@cybec.com.au
PHP arrays permit extremely concise programming; for example if I have all
my contacts in
an array $contacts, I can write:
$my_phone_no = $contacts['clancy']['phone'];
However it is clear that there must be a lot going on behind the scenes to
achieve
Clancy wrote:
Also what the relative virtues of defining the same set of fields for every
contact, as
against either defining only the fields which actually hold values, as in the
following
examples?
a:
$contacts['clancy']['home_address'] = 'jkjkjk';
$contacts['clancy']['home_phone'] = 0123
On Wed, 2009-01-28 at 10:38 +1100, Clancy wrote:
PHP arrays permit extremely concise programming; for example if I have all my
contacts in
an array $contacts, I can write:
$my_phone_no = $contacts['clancy']['phone'];
However it is clear that there must be a lot going on behind the scenes
Robert Cummings wrote:
On Wed, 2009-01-28 at 10:38 +1100, Clancy wrote:
PHP arrays permit extremely concise programming; for example if I have all my
contacts in
an array $contacts, I can write:
$my_phone_no = $contacts['clancy']['phone'];
However it is clear that there must be a lot going
Nicholas Yim wrote:
Hello William Stokes,
1 write a callback function:
[php]
function cmp_forth_value($left,$right){
return $left[4]$right?-1:($left[4]==$right[4]?0:1);
return $left[4]$right[4]?-1:($left[4]==$right[4]?0:1);
^^^
add this
}
Nicholas Yim wrote:
Hello William Stokes,
1 write a callback function:
[php]
function cmp_forth_value($left,$right){
return $left[4]$right?-1:($left[4]==$right[4]?0:1);
return $left[4]$right[4]?-1:($left[4]==$right[4]?0:1);
^^^
add this
}
Hello,
How to print out the following array $test so that the print order is by the
fourth[4] key? I need to print out all arrays in $test so that the data is
ordered by the fourth key in ascending order.
$test =Array (
[0] = Array (
[0] = 5
[1] = 2
[2] = sika
[3] = sika.php
[4] = 1
Hello William Stokes,
1 write a callback function:
[php]
function cmp_forth_value($left,$right){
return $left[4]$right?-1:($left[4]==$right[4]?0:1);
}
[/php]
2 use the usort function
usort($test,'cmp_forth_value');
Best regards,
=== At 2007-01-08, 14:46:33 you wrote:
Hello,
I'm making a menu script that uses mysql, php and javascript to build a on
mouse over dropdown menu to a page. I ran into some problems and would need
help to get this working. (This is just the top level of the menusystem)
1. Get the toplevel links from DB, create array and put values
On Fri, 2007-01-05 at 18:48 +0200, William Stokes wrote:
Hello,
I'm making a menu script that uses mysql, php and javascript to build a on
mouse over dropdown menu to a page. I ran into some problems and would need
help to get this working. (This is just the top level of the menusystem)
On Sat, October 21, 2006 6:25 pm, Kevin Wilcox wrote:
ext/standard/var_unserializer.c, and I don't think what will port to a
That's pretty much the code I would have pointed you to...
Unless you happen to KNOW that all the data inside the arrays is
ultimately scaler or something...
I suppose
I have a feeling this may be the wrong group to ask this question, but
I thought that if it is, someone can point me in the right direction.
I'm working on a application written in C that needs to parse and
understand php arrays that have been serialized and stored in a MySQL
table. I started
Kevin Wilcox wrote:
I have a feeling this may be the wrong group to ask this question, but
I thought that if it is, someone can point me in the right direction.
I'm working on a application written in C that needs to parse and
understand php arrays that have been serialized and stored
At 3:38 PM -0400 7/10/06, Dallas Cahker wrote:
Banging my head against a wall with arrays, maybe someone can help me with
the answer.
I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an
Banging my head against a wall with arrays, maybe someone can help me with
the answer.
I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.
part of
Dallas Cahker wrote:
Banging my head against a wall with arrays, maybe someone can help me with
the answer.
I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected
When loading the array you will only ever get the last record returned...
so count($oarray) will always be 1?
Perhaps something like this:
Function
$sql = ...;
$ret = array();
while($row = mysql_feth_array($reault)) {
array_push($ret, $row);
}
return $ret;
then...
$data = function();
$c =
Both work great.
Thanks
On 7/10/06, Brad Bonkoski [EMAIL PROTECTED] wrote:
When loading the array you will only ever get the last record returned...
so count($oarray) will always be 1?
Perhaps something like this:
Function
$sql = ...;
$ret = array();
while($row =
if I have two arrays, example:
$a = array (one, two, three, four, two);
$b = array (seven, one, three, six, five);
How can I get in another variable a new array with the same elements into $a
and $b.
--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos
[snip]
if I have two arrays, example:
$a = array (one, two, three, four, two);
$b = array (seven, one, three, six, five);
How can I get in another variable a new array with the same elements into $a
and $b.
[/snip]
http://www.php.net/array_merge
--
PHP General Mailing List
Hola Jesus. Hablo un pocitio espanol, pero en ingles no estoy seguro que
quieres decir. Si te ayudara, envia el mensaje otra vez en espanol y tratare
comprender.
On 09/06/06, Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote:
if I have two arrays, example:
$a = array (one, two, three,
On 6/9/06, Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote:
if I have two arrays, example:
$a = array (one, two, three, four, two);
$b = array (seven, one, three, six, five);
How can I get in another variable a new array with the same elements into $a
and $b.
php.net/array_intersect
Jess Alain Rodrguez Santos wrote:
if I have two arrays, example:
$a = array ("one", "two", "three", "four", "two");
$b = array ("seven", "one", "three", "six", "five");
How can I get in another variable a new array with the same elements into $a and $b.
$new_array =
Hi,
I'm making a PHP Installer that is customizable by using plugins, I haven't
used PHP for a while and which I have forgotten some things about PHP *eek*..
Anyway, I want to know how to add things to an array. Like this:
$foobar = array()
$foobar['rar']['miaw']
Would that output come out
On 27 Apr 2006, at 20:51, Saul Rennison wrote:
Anyway, I want to know how to add things to an array. Like this:
$foobar = array()
$foobar['rar']['miaw']
Would that output come out (for the array) as:
array(
'rar' = 'miaw'
)
No, it would create a multi-dimensional array that contains
Saul Rennison wrote:
Hi,
I'm making a PHP Installer that is customizable by using plugins, I haven't
used PHP for a while and which I have forgotten some things about PHP *eek*..
$hiddenKnowledge = unforgetPHP();
Anyway, I want to know how to add things to an array. Like this:
$foobar =
Sorry if this question seems stupid - I've only had 3 days of PHP
experience.
When using the following string format, I get an error from PHP.
$text['text'] = String Text ;
Can someone help me?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
At 11:12 AM 2/4/2006, Philip W. wrote:
When using the following string format, I get an error from PHP.
$text['text'] = String Text ;
Hi Philip,
If that's literally a line from your script, my guess is that text
is a reserved word and can't be used as a variable name. Try $sText
or
, February 04, 2006 11:12 AM
Subject: [PHP] Arrays
Sorry if this question seems stupid - I've only had 3 days of PHP
experience.
When using the following string format, I get an error from PHP.
$text['text'] = String Text ;
Can someone help me?
--
PHP General Mailing List (http://www.php.net
If I have an array, such as
$Var[0] = Dog;
$Var[1] = Cat;
$Var[2] = Horse;
Is there a way to quickly check to see if $Var contains Lion without
walking through each value?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Is there a way to quickly check to see if $Var contains Lion without
walking through each value?
[/snip]
http://us3.php.net/in_array
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 6 Dec 2005, at 17:33, Ben Miller wrote:
If I have an array, such as
$Var[0] = Dog;
$Var[1] = Cat;
$Var[2] = Horse;
Is there a way to quickly check to see if $Var contains Lion without
walking through each value?
Look in the manual at the function in_array()
Cheers,
Rich
--
This what you want?
http://us3.php.net/manual/en/function.array-search.php
-TG
= = = Original message = = =
If I have an array, such as
$Var[0] = Dog;
$Var[1] = Cat;
$Var[2] = Horse;
Is there a way to quickly check to see if $Var contains Lion without
walking through each value?
On Fri, 2005-11-11 at 15:25, cybermalandro cybermalandro wrote:
I have this that looks like this
array(3) {
[0]=
array(2) {
[0]=
string(1) 1
[1]=
string(1) 2
}
[1]=
array(2) {
[0]=
string(3) 492
[1]=
string(3) 211
}
[2]=
array(2)
I have this that looks like this
array(3) {
[0]=
array(2) {
[0]=
string(1) 1
[1]=
string(1) 2
}
[1]=
array(2) {
[0]=
string(3) 492
[1]=
string(3) 211
}
[2]=
array(2) {
[0]=
string(2) 11
[1]=
string(2) 20
}
}
I want to loop through
Here's a few loops that should work. You can actually just use the
first loop to concatenate text string instead create array items, but
I wasn't sure what type of processing you wanted to do with the result.
//Convert Array from 3 rows by 2 cols - 2 rows by 3 cols
for($i=0;
Hi,
How can i destroy an array?
I mean i have a loop and for each new value in the loop i want to destroy the
array. Something like that:
while($row = mysql_fetch_array($result))
{
$product[] = $product_id;
// some code here
}
I've tried this but doesn't
Hello,
You may try unset($product) in your loop if you want to delete this var.
Your code $product=array(); must work too...
Another way, must be to use something like this $product[id]=$product_id;
But i dont think it's your real goal?!
Could you give some more information about that?
Olivier
On 12/07/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi,
How can i destroy an array?
I mean i have a loop and for each new value in the loop i want to destroy the
array. Something like that:
while($row = mysql_fetch_array($result))
{
$product[] = $product_id;
.
Best regards,
Shiqi Yang
-Original Message-
From: Justin Gruenberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 12, 2005 7:43 PM
To: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Arrays
On 12/07/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi,
How can i
hi! i'm trying to use the simple_xml functions to get an arrray of
data from a sample xml file.
here's my sample_data.xml
?xml version=1.0 encoding=ISO-8859-1?
sample_data
first_names
You can absolutely use arrays as form field names. They allow great
flexibility. Although you wouldn't use quotes for the array keys.
So your form field name would be something like:
att[keyname]
While in PHP, the same array would look like:
$att['keyname']
Your array id's are consider keys
Would it be possible in a form fields name to make it an array?
This way it would be i.e. att[$part_id]
Now is there a way to iterate through the array when I submit the form
to process it, being that the ID numbers are not going to be
sequential and that there will be some numbers not
Hodicska Gergely wrote:
trigger_error('Hoppa, egy új típus a PHP-ben?
'.__CLASS__.'::'.__FUNCTION__.'()!', E_USER_WARNING);
on that line, what is the error you are trying to catch? I can't read what
ever language that is ;-) thanks.
-Nick Peters
--
PHP General
Hodicska Gergely wrote:
Hi!
Would this work the same for multidimensional arrays?
Encoding was a special feature needed by me, maybe you don't need it.
Usage:
myArray = array(...);
echo 'script'.arrayToJsArray($myArray, 'myArray').'/script';
Felho
--- 8 --- arrayToJsArray.php ---
Marek Kilimajer wrote:
Nick Peters wrote:
Hey,
i know this probally a simple question, but it has been stumping me for
quite some time now. How do i pass a php array to a javascript?
i tryed:
script language=javascript
var myarray = new Array(?PHP echo $myarray; ?);
/script
but it
Nick Peters wrote:
Marek Kilimajer wrote:
Nick Peters wrote:
Hey,
i know this probally a simple question, but it has been stumping me for
quite some time now. How do i pass a php array to a javascript?
i tryed:
script language=javascript
var myarray = new Array(?PHP echo $myarray; ?);
/script
but
Hi!
Would this work the same for multidimensional arrays?
Encoding was a special feature needed by me, maybe you don't need it.
Usage:
myArray = array(...);
echo 'script'.arrayToJsArray($myArray, 'myArray').'/script';
Felho
--- 8 --- arrayToJsArray.php --- 8 ---
?
function
Hey,
i know this probally a simple question, but it has been stumping me for
quite some time now. How do i pass a php array to a javascript?
i tryed:
script language=javascript
var myarray = new Array(?PHP echo $myarray; ?);
/script
but it didn't work. Anybody got any ideas?
thanks in advance.
snip
i know this probally a simple question, but it has been stumping me for
quite some time now. How do i pass a php array to a javascript?
i tryed:
script language=javascript
var myarray = new Array(?PHP echo $myarray; ?);
/script
but it didn't work. Anybody got any ideas?
/snip
You need to
Nick Peters wrote:
Hey,
i know this probally a simple question, but it has been stumping me for
quite some time now. How do i pass a php array to a javascript?
i tryed:
script language=javascript
var myarray = new Array(?PHP echo $myarray; ?);
/script
but it didn't work. Anybody got any ideas?
Ben Miller wrote:
edit
I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values [the
whole array and all of it's values] from
page to page and/or store in a db.
?
echo (htmlheadtitleArray
Zareef Ahmed wrote:
But you need to do serialize and unserialize in case of array or object.
Do ::
$val_ar=array(one,two,three);
$_SESSION['val_ar_store']=serialize($val_ar);
Serialization is done automatically. You don't need to do it yourself.
You can even store simple value-objects in the
I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values from
page to page and/or store in a db. Once again, I am new to arrays (and
fairly new to PHP for that matter), so please don't get too technical in
edit
I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values [the
whole array and all of it's values] from
page to page and/or store in a db. Once again, I am new to arrays (and
fairly new to PHP for that
On Mon, 8 Nov 2004 16:01:16 -0700, Ben [EMAIL PROTECTED] wrote:
I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values from
page to page and/or store in a db. Once again, I am new to arrays (and
fairly new
, 2004 4:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Arrays
I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values from
page to page and/or store in a db. Once again, I am new to arrays (and
fairly new to PHP
There are a couple of ways to pass arrays (and their values) between
pages. I personally would put the array into a session variable
($_SESSION - see reference) and access the various parts as needed.
Another option is sending the whole array or it's parts as hidden fields
in a form (access
Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
Sent: Monday, November 08, 2004 10:03 PM
To: Ben
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Arrays
There are a couple of ways to pass arrays (and their values) between
pages. I personally would put the array into a session variable
I'm setting up an array based on recordset that does a loop as follows:
do {
//SET ARRAYS
$z['username'][$k] = $row_rsUSERIDID['uname'];
$z['distance'][$k++] = $totaldist;
} while ($row_rsUSERIDID = mysql_fetch_assoc($rsUSERIDID));
//SET NEW ARRAY
$z['user'] =
From: Vern [EMAIL PROTECTED]
How can I now get this output displyed in groups
of 10 so that I can display them 10 at a time on
a page then click a next button to dispaly they
next 10 and so forth?
Can't you do all that sorting in your query so you can just retrieve 10 rows at a time
Problem with that is it sorts according the results of the recordset range.
For instance:
It will show the user 1 trhough 10 sorted by miles then 20 - 30 sorted by
miles, however, in 1 through 10 could have a range of 0 to 1000 miles and
the next set will have 5 to 200 miles. What I need is to
Vern [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Problem with that is it sorts according the results of the recordset
range.
For instance:
It will show the user 1 trhough 10 sorted by miles then 20 - 30 sorted by
miles, however, in 1 through 10 could have a range of 0 to 1000
The miles are being caluculated during the loop that is created using the
recordset not in the database.
First I create a do..while loop to get the miles
do {
$k = 0;
//SET FIRST ARRAY OF ONLINE USERS AND CALCULATE MILES
do {
//GEOZIP
$zip2 = $row_rsUSERIDID['zip'];
1 - 100 of 270 matches
Mail list logo