Gerard Samuel wrote:
Not sure if the subject was worded correctly, but
I was looking to see if this (or something like it) is possible.
$array = array('key_1' = 'This is some text',
'key_2' = 'b' . $array['key_1'] . '/b'
);
And the array structure
I have an unusual situation where I have to communicate with an MS based
soap server. They have named one of their variables with a name leading
with a 1 such as 1variable. Nusoap loads the variable descriptions from the
wsdl document and compares the variable names I am trying to send with the
[snip]
if($data[$currentVarNameInCycle])
{
do something
}
Is there some way force the recognition of the key when it leads with
a
digit?
[/snip]
not sure I follow 100% but you could use a regular expression to
detemine if it starts with a string.
if (preg_match('/^\d/',$array_key)) {
[snip]
not sure I follow 100% but you could use a regular expression to
detemine if it starts with a string.
if (preg_match('/^\d/',$array_key)) {
//do something
}
[/snip]
I mean starts with a digit, sorry for 2 emails. I should proofread.
--
PHP General Mailing List (http://www.php.net/)
To
I am using the following array and function in the template for my website.
It works great, but I want to to be better. I would to make it so the last
item displayed looks differently than the others, but I have been unable to
figure out how to distinguish the last item.
When displayed, the
On 16-Apr-2004 Flavio Fontana wrote:
Hi
I have i Problem i got a variable a=2351 now i need to create an
array out of this variable
a[0]=1
a[1]=3
a[2]=5
a[3]=1
I have an idea to use the modulo function an do some Math but im sure
there is a nicer way of solving my prob
$a =
Greetings everyone :
Having a hard time with this one. I have a multi-dim array
$foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample data :
Array
(
[$x] = Array
(
[0] = Array
(
[invoiceid] = 11842
Hi
I have i Problem i got a variable a=2351 now i need to create an array out of this
variable
a[0]=1
a[1]=3
a[2]=5
a[3]=1
I have an idea to use the modulo function an do some Math but im sure there is a nicer
way of solving my prob
thx Flavio
--
PHP General Mailing List
That's how you could do it ...
$ar = array();
$len = strlen($a);
for ($i = 0; $i $len; ++$i) {
$ar[] = $a{$i};
}
HTH
Richard
Friday, April 16, 2004, 11:00:49 PM, you wrote:
Hi
I have i Problem i got a variable a=2351 now i need to create an array out of this
variable
a[0]=1
That's how you could do it ...
$ar = array();
$len = strlen($a);
for ($i = 0; $i $len; ++$i) {
$ar[] = $a{$i};
}
If I remember well strlen is used for checking the length of a string...
Arthur
Looking for a job!? Use the
How about count()
That's how you could do it ...
$ar = array();
$len = strlen($a);
for ($i = 0; $i $len; ++$i) {
$ar[] = $a{$i};
}
HTH
Richard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Saturday, April 17, 2004, 7:38:46 PM, Arthur Radulescu wrote:
That's how you could do it ...
$ar = array();
$len = strlen($a);
for ($i = 0; $i $len; ++$i) {
$ar[] = $a{$i};
}
If I remember well strlen is used for checking the length of a string...
It does ...
I didn't look
Hi,
Saturday, April 17, 2004, 7:00:49 AM, you wrote:
FF Hi
FF I have i Problem i got a variable a=2351 now i need to create an array out of this
variable
FF a[0]=1
FF a[1]=3
FF a[2]=5
FF a[3]=1
FF I have an idea to use the modulo function an do some Math but
FF im sure there is a nicer way of
.
= $columntotals[$count] = $sum;
Is right?
Sorry, I confuse with your words total of totals?
Good Luck,
Firman
- Original Message -
From: noginn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 12:33 AM
Subject: [PHP] Array problem
This has been confusing me a little
should tried this one.
= $columntotals[$count] = $sum;
Is right?
Sorry, I confuse with your words total of totals?
Good Luck,
Firman
- Original Message -
From: noginn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 12:33 AM
Subject: [PHP] Array problem
This has
This has been confusing me a little for a few hours now.
Heres a snip of my code which is causing the problem:
$content = table border='0' cellspacing='0' cellpadding='5'\n;
$content .= tr\n;
$content .= tdnbsp;/td\n;
$tasks = new dbconnect;
$tasks-connect();
On Tuesday 16 March 2004 12:16, thou spake:
You're the Joey Kelly who runs the LUG in NoLA, yes?
Yes, that's me. Have you been to one of our meetings lately? We redid our
website recently: http://www.nolug.org
Thanks for saying hi :-)
snip
Upon post, you need to get materials as such:
Hi All,
I have a function that gets a single field from a mssql db. That field
contains data that is then parsed out to represent a survey's results.
The function;
function quesresults(){
$query = SELECT sur_ans
FROM au_survey;
$result =
Alex Hogan mailto:[EMAIL PROTECTED]
on Tuesday, March 16, 2004 9:48 AM said:
$row = mssql_fetch_array($result);
$thearray = explode('__', $row); - This is line 40
$row is an entire array. you don't explode an entire array, you only
explode the contents of an
Hello,
I have a SuSE 9.0 Linux server running PHP and Apache2 (my phpinfo() data is
at http://redfishnetworks.com/~jkelly/test.php), and my problem is this:
I've got a sticky problem that I need to solve. I've just turned on
register_globals in my PHP php.ini file, and therefore have to run my
Hello Joey,
Tuesday, March 16, 2004, 6:16:34 PM, you wrote:
JK I have a SuSE 9.0 Linux server running PHP and Apache2 (my phpinfo() data is
JK at http://redfishnetworks.com/~jkelly/test.php), and my problem is this:
JK I've got a sticky problem that I need to solve. I've just turned on
JK
Joey Kelly mailto:[EMAIL PROTECTED]
on Tuesday, March 16, 2004 10:17 AM said:
The problem I'm having is that the script Im trying to refactor
worked great before I turned register_globals off. The script posts
an array, and I can't seem to figure out how to $_POST the array.
the script
You're the Joey Kelly who runs the LUG in NoLA, yes?
I've got a sticky problem that I need to solve. I've just turned on
register_globals in my PHP php.ini file, and therefore have to run my form
variables through $_POST:
$variable = $_POST[$variable];
echo $variable;
Or you can use
$row is an entire array. you don't explode an entire array, you only
explode the contents of an element of an array.
print_r($row) will give you some clues.
you'll need to access a specific element within the array. like:
$thearray = explode('__', $row[0][0]);
That was it... Thanks
I would like to be able to search an array for a match the a specific
variable. So far, I have been trying to use preg_grep but am not getting
the results that I want.
Basically, I would have a variable: $url = domain.com
I would like to search an array to see if the value of the variable $url
I would like to search an array to see if the value of the variable $url
exists in this array. The array would look like:
in_array()
-
michal migurski- contact info and pgp key:
sf/ca
Hello Imran,
Wednesday, February 11, 2004, 8:17:11 PM, you wrote:
IA Is not working, is it correct way
IA File1.php
IA? $colors = array('red','blue','green','yellow'); ?
IAform action=file2.php method=post
IA input type=hidden type name=colors value=?=$colors?
IA
[] value=green
input type=hidden name=colors[] value=yellow
[/code]
... and File2.php will do its job as desired.
Shaunak
-Original Message-
From: Imran Asghar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 3:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] array data
Hi
Hi,
Is not working, is it correct way
File1.php
? $colors = array('red','blue','green','yellow'); ?
form action=file2.php method=post
input type=hidden type name=colors value=?=$colors?
/fomr
File2.php
?
echo $colors[0];
echo $colors[1];
echo $colors[2];
I'm having array block, trying to format the data in a two dimensional
associative array.
$menu = array (
'link1' = array(
'url' = 'foo',
'title' = 'bar'
),
'link2' = array(
'url' = 'foo',
'title' =
Hi,
How would I go about determining if a specific key exists in an array?
I want to see if $conf['hOpt'] is defined. is_array only works at the $conf
level.
I tried count(array_keys($conf, 'hOpt')), but always get 0.
What am I doing wrong here?
Thanks,
Cameron
--
PHP General Mailing List
Cameron B. Prince wrote:
How would I go about determining if a specific key exists in an array?
http://php.net/isset
I want to see if $conf['hOpt'] is defined. is_array only works at the $conf
level.
I tried count(array_keys($conf, 'hOpt')), but always get 0.
if (isset($conf['h0pt']))
--
Stuart
Hi all,
can somebody remind me how to propperly insert not just one but many
variables into a $_SESSION handle? php manual doesn't explain it very well.
It just says that it can be done.
Thanks in advanced,
Cesar Aracena
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Friday 02 January 2004 02:11 am, Cesar Aracena wrote:
Hi all,
can somebody remind me how to propperly insert not just one but many
variables into a $_SESSION handle? php manual doesn't explain it very well.
It just says that it can be done.
$_SESSION['foo'] = array('a', 'b', 'c', 'd',
Thanks a lot :)
Gerard Samuel [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
On Friday 02 January 2004 02:11 am, Cesar Aracena wrote:
Hi all,
can somebody remind me how to propperly insert not just one but many
variables into a $_SESSION handle? php manual doesn't
To: [EMAIL PROTECTED]
Subject: [PHP] Array into $_SESSION
Hi all,
can somebody remind me how to propperly insert not just one but many
variables into a $_SESSION handle? php manual doesn't explain it very well.
It just says that it can be done.
Thanks in advanced,
Cesar Aracena
--
PHP General
To: Cesar Aracena; PHP List
Subject: RE: [PHP] Array into $_SESSION
session_register(user);
session_register(authLevel);
session_register(sessionExpire);
$user=$userDataFromForm;
$authLevel = $authLevelFromDB;
$sessionExpire = time() + 3600;
etc...
-Original Message-
From: Cesar Aracena [mailto
newbie ...
Is it possible to format data in array to XML and display ?
Thanks !
Well just so you understand why I needed something like that here is
the finished result below
?php
function show() {
require 'path/to/dbconnector.inc';
$sql_subs = mysql_query(SELECT * FROM $t_02,$db)or die(mysql_error());
$i = 0;
while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge)
Jas mailto:[EMAIL PROTECTED]
on Thursday, December 11, 2003 7:21 AM said:
Well just so you understand why I needed something like that here is
the finished result below
[snip]
$i = 0;
while(list(...) = mysql_fetch_row(...)) {
$_SESSION[$i] = ...;
$i++;
}
I want to change my
Yeah I understand that and it would be perfect if I only had to call
this type of function once on a page... and on any other pages that need
something like this I will do it that way but with the counter set to 0
or whatever number I choose which is a sort of view all page so your
solutions
I am trying to read in a text file to an array using the following code,
however everytime I try and print the contents of the $table array, it
always says ARRAY. Why won't it show me the actual contents of the file?
$row = 1;
$handle = fopen (seclog.txt,r);
while ($data = fgetcsv ($handle,
Because it's and array! print and echo take strings, not arrays, I believe. Anyway,
print_r() or a foreach loop will do it for you.
?php
print_r($table);
//or
foreach ($table as $atable){
echo $tableBr;
}
?
Something like that.
Brian Sutton [EMAIL PROTECTED] 12/10/03 01:26PM
I am trying
Hi,
Wednesday, December 10, 2003, 6:29:43 PM, you wrote:
RM Because it's and array! print and echo take strings, not
RM arrays, I believe. Anyway, print_r() or a foreach loop will do it
RM for you.
Agreed.. print_r() is the best, but if you're outputting all of this
text into the browser
Richard Davey wrote:
Hi,
Wednesday, December 10, 2003, 6:29:43 PM, you wrote:
RM Because it's and array! print and echo take strings, not
RM arrays, I believe. Anyway, print_r() or a foreach loop will do it
RM for you.
Agreed.. print_r() is the best, but if you're outputting all of this
text
Not very good at arrays so I figured i would look here
?php
$sql_subs = mysql_query(SELECT * FROM $t_02,$db)or
die(mysql_error());
while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge) =
mysql_fetch_row($sql_subs)) {
print $sub;
print br;
print $msk;
print br;
print $dns01;
print br;
Jas mailto:[EMAIL PROTECTED]
on Wednesday, December 10, 2003 3:21 PM said:
while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge) =
mysql_fetch_row($sql_subs)) {
$_session['something to automaticly increment session var'] =
$sub+$msk+$dns01...
}
No exactly sure what you mean but here
Chris W. Parker
on Wednesday, December 10, 2003 3:27 PM said:
while(list(...)) = mysql_fetch_row(...))
{
Got one too many ) in there. Should be:
while(list(...) = mysql_fetch_row(...))
{
Chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
having no idea you could use numbers as session variable names I kinda
feel like a retard right now. You solution worked, thank you very much.
Jas
Chris W. Parker wrote:
Jas mailto:[EMAIL PROTECTED]
on Wednesday, December 10, 2003 3:21 PM said:
Jas mailto:[EMAIL PROTECTED]
on Wednesday, December 10, 2003 3:44 PM said:
having no idea you could use numbers as session variable names I kinda
feel like a retard right now. You solution worked, thank you very
much.
It's an array just like any other which you probably realize now. ;)
Jas wrote:
but what I need to do is something like this...
?php
$sql_subs = mysql_query(SELECT * FROM $t_02,$db)or
die(mysql_error());
while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge) =
mysql_fetch_row($sql_subs)) {
$_session['something to automaticly increment session var'] =
$city = Ipswitch;
$city_found = 0;
$contentfile = fopen(content.txt, r);
while (!feof($contentfile) $city_found == 0);
{
$my_line = fgets($contentfile, 16384);
$content_array = explode(\t,$my_line);
if ($content_array[0] == $city)
{
$city_found = 1;
On Friday 28 November 2003 16:03, [EMAIL PROTECTED] wrote:
I think what you got is a scope problem. You are creating $content_array
in your while loop so its scope is limited to the while loop. To test this
simply do a var_dump or print_r on $content_array outside your loop and
see if it
Curtis Maurand wrote:
OK. That worked, thanks.
Is it me, or is that rather odd behavior?
It is you ;)
Shouldn't array elements
set within a loop be available to me outside the loop if the loop
exits normally? A loop is not a function (well it is, sort of.)
Should I declare the variable
On Thu, Nov 27, 2003 at 08:19:02PM -0500, Curtis Maurand wrote:
: On Wednesday 26 November 2003 21:53, Marek Kilimajer mumble:
: Curtis Maurand wrote:
: Sorry, its a typo. it should be:
:
: $city = Ipswitch;
: $city_found = 0;
: $contentfile = fopen(content.txt, r);
: while
Thank you, I'll try that.
Curtis
On Wednesday 26 November 2003 21:53, the council of elders heard Marek
Kilimajer mumble incoherently:
Curtis Maurand wrote:
Sorry, its a typo. it should be:
$city = Ipswitch;
$city_found = 0;
$contentfile = fopen(content.txt, r);
while
OK. That worked, thanks.
Is it me, or is that rather odd behavior? Shouldn't array elements
set within a loop be available to me outside the loop if the loop
exits normally? A loop is not a function (well it is, sort of.)
Should I declare the variable as global?
global $content_array;
On Wednesday 26 November 2003 04:45, Curtis Maurand wrote:
consider the following code (content.txt is tab delimited).
$city = Ipswitch;
$content = fopen(content.txt, r);
$city_found = 0;
while (!feof($content) $city_found == 0)
{
$my_line = fgets($content, r);
Sorry, its a typo. it should be:
$city = Ipswitch;
$city_found = 0;
$contentfile = fopen(content.txt, r);
while (!feof($contentfile) $city_found == 0);
{
$my_line = fgets($contentfile, 16384);
$content_array = explode(\t,$my_line);
if ($content_array[0] == $city)
{
Curtis Maurand wrote:
Sorry, its a typo. it should be:
$city = Ipswitch;
$city_found = 0;
$contentfile = fopen(content.txt, r);
while (!feof($contentfile) $city_found == 0);
{
$my_line = fgets($contentfile, 16384);
$content_array = explode(\t,$my_line);
if ($content_array[0] ==
I understand that in PHP there is only one dimension array, and in order to
create several dimensions, yo need to nested the same function array(), but
in conclusion you obtain n dimensions of the array whatever the
implementation, I have already figured it out the problem , thanks anyway
for all
Hello,
consider the following code (content.txt is tab delimited).
$city = Ipswitch;
$content = fopen(content.txt, r);
$city_found = 0;
while (!feof($content) $city_found == 0)
{
$my_line = fgets($content, r);
$content_array = explode(\t,$my_line);
if ($content_array == $city)
On Tue, Nov 25, 2003 at 03:45:11PM -0500, Curtis Maurand wrote:
:
: Hello,
: consider the following code (content.txt is tab delimited).
:
: $city = Ipswitch;
: $content = fopen(content.txt, r);
: $city_found = 0;
: while (!feof($content) $city_found == 0)
: {
: $my_line =
Curtis Maurand wrote:
Hello,
consider the following code (content.txt is tab delimited).
$city = Ipswitch;
$content = fopen(content.txt, r);
$city_found = 0;
while (!feof($content) $city_found == 0)
{
$my_line = fgets($content, r);
$content_array = explode(\t,$my_line);
if
Hi,
I must be missing something in this array. To me this makes no sense.
Here is it broken down...
Declartion:
$gtotals = array(
CO1 = 0,
CO2 = 0,
CO3 = 0,
CO4 = 0,
CO5 = 0,
On Mon, 2003-11-24 at 13:42, Dan Joseph wrote:
Hi,
I must be missing something in this array. To me this makes no sense.
Here is it broken down...
Declartion:
$gtotals = array(
CO1 = 0,
CO2 = 0,
CO3 = 0,
CO4
Hi,
I think you might have some letter 'O's instead of the number 0. Notice
that you have CO1 and C01 when you print_r. They are different keys.
I think you are correct! hahaha... oh man, one of those Mondays! Thank
you sir!
-Dan Joseph
--
PHP General Mailing List
The problem is most likely that I have been looking at it for too long
and missed the obvious. I know I can make multiple fields in the
database and work with it that way, but I'm sure an array is the proper
solution.
We have a form (and how many of our tales start off like that? Bet it
beats
: Tuesday, November 18, 2003 12:55 PM
To: List PHP General
Subject: [PHP] Array + postgresql + braincramp
The problem is most likely that I have been looking at it for too long
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Williard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 6:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Array -- If
I am building a script that I would like to have do a specific task
based on whether specific counts have been reached.
Basically, the script checks for connectivity
I am building a script that I would like to have do a specific task
based on whether specific counts have been reached.
Basically, the script checks for connectivity in a specific port. If
the connectivity fails, it increases the count by 1. It does this every
minute. I would like the script
Jake McHenry wrote:
Hi everyone, here's what I'm doing.
As of right now, I don't have anything implemented, but here's what I
need to do.
I have a web page, with a drop down list of hotels, an input box for
the users frequent hotel number, and a add button. At the bottom of
the page is a update
-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 01, 2003 3:50 AM
To: Jake McHenry; [EMAIL PROTECTED]
Subject: Re: [PHP] Array maybe? Or many SQL insert queries
Jake McHenry wrote:
Hi everyone, here's what I'm doing.
As of right
Jake McHenry wrote:
-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 01, 2003 3:50 AM
To: Jake McHenry; [EMAIL PROTECTED]
Subject: Re: [PHP] Array maybe? Or many SQL insert queries
Jake McHenry wrote:
Hi everyone, here's what I'm doing
-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 01, 2003 11:16 AM
To: Jake McHenry; [EMAIL PROTECTED]
Subject: Re: [PHP] Array maybe? Or many SQL insert queries
Jake McHenry wrote:
-Original Message-
From: Burhan Khalid [mailto
Hi everyone, here's what I'm doing.
As of right now, I don't have anything implemented, but here's what I
need to do.
I have a web page, with a drop down list of hotels, an input box for
the users frequent hotel number, and a add button. At the bottom of
the page is a update and continue button
Hi All,
Im having a headache trying to sort this out...
I have my array which is created each time a user adds an item to my basket,
this all works fine. The problem im having is that when the user adds the
item to the cart they have the option of selecting '0' as the quantity which
in effect
Hi,
I'm trying to use our java-code in php.
But strange things happens
Maybe I did a simple mistake..
$MyInf=new Java(myUtil.myInfo);
This is inside of a loop through 3 items:
$MyAttributes=array();
$MyAttributes=$MyInf-MyAttrReader($v, ,, $item);
$c=null;
$c=count($MyAttributes);
so far
* Thus wrote Richard Cook ([EMAIL PROTECTED]):
Hi All,
Im having a headache trying to sort this out...
If the customer inputs the value 0 into quantity the array looks like this:
$array[0][0] = 22
$array[0][1] = 0
The question is who can i filter the array removing any values
Hi,
please post your full code
Helke Schröder wrote:
Hi,
I'm trying to use our java-code in php.
But strange things happens
Maybe I did a simple mistake..
$MyInf=new Java(myUtil.myInfo);
This is inside of a loop through 3 items:
$MyAttributes=array();
$MyAttributes=$MyInf-MyAttrReader($v,
Hi,
thanks for the replay
the var_dump on the array of java-objects looks interesting:
the first, which is ok:
array(8) { [0]= object(java)(1) { [0]= int(3) } [1]= object(java)(1)
[0]= int(4) } [2]= object(java)(1) { [0]= int(5) } [3]=
object(java)(1) { [0]= int(6) } [4]= object(java)(1) {
I want to store an ARRAY in a SQL-table but don't know how to define it in
the table. The PHP-stuff is working OK but the DB-thing isn't.
Anyone tried this? Hopefully it is
Reidar Solberg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If the field isn't required to be searchable, you could just serialize
the array and shove that into a VARCHAR column.. Then unserialize the
return value for that column.
Jordan S. Jones
Reidar wrote:
I want to store an ARRAY in a SQL-table but don't know how to define it in
the table. The
Hello everybody.
Is there any built-in function to convert an array to
string?
Thanks.
__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I just found it: implode. Sorry to bother you.
__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Greetings..
Doing some persistant connection socket-based PHP stuff and I'm trying to
figure out a few things:
1) How can I create an array of classes so they could be referenced, for
instance: $array[$uniqueID][$class-var] = 10; ?
2) Would it instantiate when that particular element was used
On Mon, 6 Oct 2003 13:41:22 -0400, you wrote:
1) How can I create an array of classes so they could be referenced, for
instance: $array[$uniqueID][$class-var] = 10; ?
2) Would it instantiate when that particular element was used and would the
constructor run at that point?
3) Any way to
Cheers! Just what I was looking for. :)
Rob
David Otton [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Mon, 6 Oct 2003 13:41:22 -0400, you wrote:
1) How can I create an array of classes so they could be referenced, for
instance: $array[$uniqueID][$class-var] = 10; ?
2) Would
Good morning all!!
Can you nest an array within an array??
Example: $paArgs['aCheckBoxes[$iIndex]['sName']']
Thank you in advance.
Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Sat, 2003-09-27 at 12:18, Robin Kopetzky wrote:
Good morning all!!
Can you nest an array within an array??
Example: $paArgs['aCheckBoxes[$iIndex]['sName']']
You mean can you retrieve an array entry by giving a key defined by a
value in another array? To do so remove the outer quotes in
On Saturday 27 September 2003 11:18, Robin Kopetzky wrote:
Good morning all!!
Can you nest an array within an array??
Example: $paArgs['aCheckBoxes[$iIndex]['sName']']
Yes, but like this
$array['aCheckBoxes'][] = $iIndex['sName']
This means:
$array is an array
aCheckBoxes is a item in
http://www.php.net/manual/en/language.types.array.php
If you mean having an array inside an array, of course ? $arr =
array(array('data')); ?. There you have an array inside another
one, 'data' will be here $var['0']['0'].
If you meant using an array item as the key in another array,
then you do
Hi Fellas!
Here's the clipping of an article about putting HTML variables into a
PHP Array upon submission. Right now, I'm having trouble getting Javascript
to do the error checking of each of the HTML variable if it's variable name
is treated as an array. Anyone know of a workaround
if f = your form then f.elements['MyArray[]'] is a javascript array of
input elements.
Scott Fletcher wrote:
Hi Fellas!
Here's the clipping of an article about putting HTML variables into a
PHP Array upon submission. Right now, I'm having trouble getting Javascript
to do the error
Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
if f = your form then f.elements['MyArray[]'] is a javascript array of
input elements.
Scott Fletcher wrote:
Hi Fellas!
Here's the clipping of an article about putting HTML variables into
a
PHP Array upon submission
I'd like to do this, but it produces an error:
if ($_POST{[detail][11][116]} !$_POST{[detailtext][19][114]}) {
so I'm left doing this
if ($_POST[detail][11][116] !$_POST[detailtext][19][114]) {
How can I encapsulate the array so it is a multi-dimensional array and not just
a string length?
if ($_POST[detail][11][116] !$_POST[detailtext][19][114]) {
How can I encapsulate the array so it is a multi-dimensional array and
not just
a string length?
I'm not exactly sure what you're array structure is but that syntax is
correct.
$_POST['key1']['key2']...
Larry
--
PHP General Mailing
How do I know it won't just assume that $_POST[detail][11][116] means the
116th character in the string $_POST[detail][11]?
Larry E . Ullman wrote:
if ($_POST[detail][11][116] !$_POST[detailtext][19][114]) {
How can I encapsulate the array so it is a multi-dimensional array and
not
Bill wrote:
How do I know it won't just assume that $_POST[detail][11][116] means the
116th character in the string $_POST[detail][11]?
Because $_POST['detail'][11] is an array (or it should be). If you're in
doubt, make sure it is with is_array().
--
---John Holmes...
Amazon Wishlist:
On Thu, 28 Aug 2003 18:14:39 -0400, you wrote:
While($row=mysql_fetch_array($res) {
That *should* create the array above, but as I mentioned array_push does not
seem to be taking the keys I just get a Parse error message for the
line. (the first array_push)
Ahem. Count the brackets? :)
601 - 700 of 1246 matches
Mail list logo