At 01:31 PM 3/25/2011, João Cândido de Souza Neto wrote:
It´s a job to array_key_exists function.
--
João Cândido de Souza Neto
Ethan Rosenberg eth...@earthlink.net escreveu na mensagem
news:0lim00hi3ihny...@mta4.srv.hcvlny.cv.net...
Dear List -
Here is a code snippet:
$bla =
It´s a job to array_key_exists function.
--
João Cândido de Souza Neto
Ethan Rosenberg eth...@earthlink.net escreveu na mensagem
news:0lim00hi3ihny...@mta4.srv.hcvlny.cv.net...
Dear List -
Here is a code snippet:
$bla = array(g1 = $results[7][6],
h1 =
On 01/20/2011 05:26 PM, Tommy Pham wrote:
On Thu, Jan 20, 2011 at 2:49 PM, Shawn McKenzie nos...@mckenzies.net wrote:
On 01/20/2011 04:28 PM, Donovan Brooke wrote:
Hello again!
I'm trying to find a good way to convert array key/value's to
variable name values... but with the caveat of the
On 01/20/2011 04:28 PM, Donovan Brooke wrote:
Hello again!
I'm trying to find a good way to convert array key/value's to
variable name values... but with the caveat of the name being
slightly different than the original key
(to fit my naming conventions).
first, I (tediously) did this:
On Thu, Jan 20, 2011 at 2:49 PM, Shawn McKenzie nos...@mckenzies.net wrote:
On 01/20/2011 04:28 PM, Donovan Brooke wrote:
Hello again!
I'm trying to find a good way to convert array key/value's to
variable name values... but with the caveat of the name being
slightly different than the
var_dump( array( true , 12 , php already does this ) );
array(3) {
[0]= bool(true)
[1]= int(12)
[2]= string(21) php already does this
}
:)
Yeah. But this feature of PHP is a boon if used carefully and a curse if
careless. You can get AMAZING results if you're not careful to
Php Developer wrote:
Hi all,
I want to be able to have an array of elements of different types. As an
example: the first element is a boolean, the second is an integer, and the
thirs is a string.
In php there is no typing, i'm just wondering if there is a way to have that,
it would be
On 04/03/10 05:42, Nathan Rixham wrote:
Php Developer wrote:
Hi all,
I want to be able to have an array of elements of different types. As an
example: the first element is a boolean, the second is an integer, and the
thirs is a string.
In php there is no typing, i'm just wondering if there
Alice Wei wrote:
Hi,
I have two arrays here that I have combined into a new array, as shown here:
$from = explode(-, $from);
$change = explode(-,$change);
$new_array = array_combine($from,$change);
I then tried reading it from a file and do string matches, trying to find out
the
On Wed, 10 Mar 2010 09:52:30 -0500, aj...@alumni.iu.edu (Alice Wei) wrote:
Hi,
I have two arrays here that I have combined into a new array, as shown here:
$from = explode(-, $from);
$change = explode(-,$change);
$new_array = array_combine($from,$change);
I then tried reading it from a file
'Twas brillig, and Jim Lucas at 10/08/09 16:29 did gyre and gimble:
$d = array(
home_page,
member_services,
member_services_login,
network,
resource_center,
verse_of_the_day_activate,
);
Ahh someone else who always puts a closing , on the end of
Colin Guthrie wrote:
'Twas brillig, and Jim Lucas at 10/08/09 16:29 did gyre and gimble:
$d = array(
home_page,
member_services,
member_services_login,
network,
resource_center,
verse_of_the_day_activate,
);
Ahh someone else who always puts a
Hello all,
I have the follwoing piece of code:
//reference a stored procedure
$procedure = Execute Procedure informix.arrest_char($part_id);
//run the stored procedure
$char_query = ifx_query($procedure, $connect_id);
//get the result of the stored procedure
$char_result =
On Saturday 24 May 2008, Chris W wrote:
Bob wrote:
Hi.
I have a database table I have created for navigation.
The table fields are uid, parent_id, menu_name.
Each entry is either a top level element with a parent_id of 0 or a child
which has a parent_id that relates to the parent
Bob wrote:
Hi.
I have a database table I have created for navigation.
The table fields are uid, parent_id, menu_name.
Each entry is either a top level element with a parent_id of 0 or a child
which has a parent_id that relates to the parent uid.
What I am trying to do is recurse through a
Eli wrote:
Hi,
Having this array:
$arr = array(
'my var'='My Value'
);
Notice the space in 'my var'.
Converted to object:
$obj = (object)$arr;
How can I access $arr['my var'] in $obj ?
-thanks!
print $obj-{'my var'};
$obj-{'my var'} = 'My New Value';
print $obj-{'my var'};
--
it happens because you forgot the semi-collon at the end of the previews
line.
Delta Storm [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
Hi,
I'm new to php and im learning, I haven't encounter any problems till now
so please help me? :)
the code: (learning arrays...)
There another error in your code in addition to the missing ;, echo() is for
strings, not arrays.
Also, look up the use of single and double quotes in the php docs. It's a good
habit to learn to use the right one early on.
Delta Storm wrote:
Hi,
I'm new to php and im learning, I haven't
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]=
string(8) 11/06/07
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
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!
2dogs wrote:
I recently encountered a situation where I had to retrieve data from a MYSQL
database table with a field named include. My code looked like this:
$content_result = mysql_query('SELECT * FROM calander') or
die(mysql_error());
$content_row = mysql_fetch_array($content_result);
if
a
key. If it is found as a constant, then the constant's value is used as the
key.
Jason
-Original Message-
From: Chuck Anderson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 3:30 PM
To: php-general@lists.php.net
Subject: [PHP] Re: array variables with or without quotes
Chuck, you are the man! I decided to reread the manual word for word but
have only gotten through Strings as of last night. Thanks for zeroing me in
on the right spot.
txs
2dogs
Chuck Anderson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
2dogs wrote:
I recently encountered
Anders Norrbring wrote:
Maybe I'm just blind, but I can't find any way to count an array size in
bytes? I have a quite big array with multiple data formats in it, and I
would like to know how big it is in bytes...
I don't think a function exists, but i would probably use (for
benchmarking)
Anders Norrbring wrote:
Maybe I'm just blind, but I can't find any way to count an array
size in bytes? I have a quite big array with multiple data formats
in it, and I would like to know how big it is in bytes...
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a function exists, but i
Paul Novitski wrote:
Anders Norrbring wrote:
Maybe I'm just blind, but I can't find any way to count an array size
in bytes? I have a quite big array with multiple data formats in it,
and I would like to know how big it is in bytes...
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a function exists, but i would probably use (for
benchmarking) a recursive foreach in combination with strlen.
And add it all up.
(This is probably some work for the PC so that's why benchmarking)
It would be interesting to know whether that
Rory Browne skrev:
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a function exists, but i would probably use (for
benchmarking) a recursive foreach in combination with strlen.
And add it all up.
(This is probably some work for the PC so that's why benchmarking)
It would be interesting to
Interesting way to solve the problem. I thought about checking whether the
keys are present (if not the checkbox is set to N.)
I wil definitily try this option as well.
Thxs all!
Sjef
Al [EMAIL PROTECTED] schreef in bericht
news:[EMAIL PROTECTED]
Sjef Janssen wrote:
Hallo,
I have a form with
Sjef Janssen wrote:
I have a form with a number of checkboxes grouped together. The value of
these boxes is stored in an array: $used[]. Now I found that the value of
checked boxes (value = 'Y') are stored in the array while non checked
boxes are not stored at all. This makes the array
Would it be enough to set a key for each checkbox, for example explicitly
say:
checkbox[1]
checkbox[2]
checkbox[3]
then a non checked box will have an empty string as a value, whereas the
checked ones will have a value of 'Y'.
Sjef
David Dorward [EMAIL PROTECTED] schreef in bericht
Would it be enough to set a key for each checkbox, for example explicitly
say:
checkbox[1]
checkbox[2]
checkbox[3]
then a non checked box will have an empty string as a value, whereas the
checked ones will have a value of 'Y'.
Nope. That's the problem. If a checkbox is unchecked the browser
Do something like:
$checkboxes = array('food','drink','smoking');
// display the checkboxes
foreach($checkboxes as $checkbox) {
echo $checkbox: input type=checkbox name=\$checkbox\ /;
}
Then when processing the form input check if each of the $checkboxes
array values are present, if
Sjef Janssen wrote:
Hallo,
I have a form with a number of checkboxes grouped together. The value of
these boxes is stored in an array: $used[]. Now I found that the value of
checked boxes (value = 'Y') are stored in the array while non checked boxes
are not stored at all. This makes the array
On 08 December 2005 16:47, Sandy Keathley wrote:
I have an array $journal that I want to carry from a page (where it
was created) to another page (a popup that shows the variables
contents). Is this automatically available? or do I have to do
something special to php??
One way:
Ford, Mike wrote:
On 08 December 2005 16:47, Sandy Keathley wrote:
...
.
.
$_SESSION['array'] = serialize($array);
Why on earth would you want to serialize an array you're adding to the session?
That's just a terrible waste of good machine cycles.
sarcasmterrible, very. too many hits
I have an array $journal that I want to carry from a page (where it was
created) to another page (a popup that shows the variables contents). Is
this automatically available? or do I have to do something special to php??
One way:
$serArray = serialize($array);
input type=hidden
Within grabQuotes(); if you do a var_dump($arg); (where $arg is $res[id]) is
your vehicle name displayed? If it is, and you're using it correctly, make
sure you're returning the value you'd like correctly. It might help to post
your grabQuotes function as well as the code that displays
I would do something like
$fp = fopen($file_location, 'r');
while (!$fp) {
$csv_line = fgetcsv($fp);
//insert line into database here after appropriate validation and cleaning
}
On Fri, 30 Sep 2005 06:29:11 -0400, Chris [EMAIL PROTECTED] wrote:
Greetings PHP community,
I have a CSV text file
Let me reply with a question first :) how do you get *to* the child? ;)
post some code so we know. In 99.99% of the cases, the way you get to
the child includes a way to find out the parent key (usually you
foreach() to it, or something similair).
- tul
Scott Fletcher wrote:
Suppose that
Array ( [count] = 1 [0] = Array ( [clientaccountmanager] = Array (
[count] = 2 [0] = 210 [1] = 149 )
I've got the following Query=select * from client WHERE
clientaccountmanager='$value of array1' OR '$2nd value of array 1'
So that the query loops through the whole array...
could this help
If you want to completely preserve the arrays and just want to append
them to each other, use the + operator:
?php
$array1 = array();
$array2 = array(1 = data);
$result = $array1 + $array2;
?
http://www.php.net/manual/en/function.array-merge.php
Ahmed Abdel-Aliem
http://uk2.php.net/manual/en/function.array-diff.php
http://uk2.php.net/manual/en/function.array-diff-assoc.php
Blackwater Dev wrote:
Hello,
Is there a good way to get the difference in two arrays and have both
values returned? I know I can use array_dif to see what is in one and
not the other
* Ed Dorsch [EMAIL PROTECTED]:
Can PHP generate an array based on file names in a folder?
For example, if I have a folder called photos that includes three
files -- tree.jpg, house.jpg and boat.jpg -- can PHP look at the
file and generate a variable $photos = array (tree,
house,boat). Any
Malcolm wrote:
Hello All,
I've been trying for days now to make this work.
I'm trying to search my array for a value and return the key.
I get the visitor's IP and try this -- this is the latest,
I've tried a few functions to echo the name associated with the viz_ip.
$viz_ip=
Ah so -- array_search only works on values ?
That probably accounts for my first day or so, thanks.
I've got it now.
On Sun, 23 Jan 2005 19:22:32 +0100, M. Sokolewicz [EMAIL PROTECTED] wrote:
Malcolm wrote:
Hello All,
I've been trying for days now to make this work.
I'm trying to search my
Tom wrote:
Hi
I'm batting my head against a wall on this one...
I have a class that has a constructor which sets some initial
conditions, and then a public function that does some work. I want to be
able to call this function from an external array_walk call, but when I
try and reference it as
Bruno b b magalhães wrote:
The problem is that when I delete an specific array, it outputs
something like this:
(
[0] = Array
(
[moduleId] = 4
[moduleName] = Contents
[modulePath] = contents
[moduleAliasPath] =
Bruno b b magalhães wrote:
So, the question, how resort the numeric values to 1,2,3,4?
http://www.php.net/array_values
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mike Smith wrote:
I am trying to cache a database recordset so users can sort, etc
without hitting the database everytime. I'm using ADODB to access a
MSSQL database.
$s = SELECT id, part, description FROM parts\n;
$r = $db-Execute($s);
$parts = array(id=array(),part=array(),desc=array())
if I die(sizeof($objDBI-Fetch_Array($objDBI-getResultID( within
the
DBI method, it return the correct value, however if I do
$retval = $objDBI-Fetch_Array($objDBI-getResultID());
die(sizeof($retVal));
$retval != $retVal
--
PHP General Mailing List (http://www.php.net/)
To
nevermind, I found a work around for it...
I still would like to know why the value is lost.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 20 Jul 2004 10:50:04 -0500 (CDT), Jonathan Villa [EMAIL PROTECTED] wrote:
nevermind, I found a work around for it...
I still would like to know why the value is lost.
What's the work-around?
--
DB_DataObject_FormBuilder - The database at your fingertips
if I die(sizeof($objDBI-Fetch_Array($objDBI-getResultID( within the
DBI method, it return the correct value, however if I do
$retval = $objDBI-Fetch_Array($objDBI-getResultID());
die(sizeof($retVal));
$retval != $retVal
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I don't understand what you're asking.
If you want to return a portion of an array, simple return the element
holding it.
In your example:
POST[var1_arr][dim1][dim2]
return var1_arr;
Will return whatever lives in var1_arr.
Have a play around, you can see what a variable contains using
Torsten Roehr wrote:
Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
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
[ snipped ]
I need to filter the results so
Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Torsten Roehr wrote:
Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Greetings everyone :
Having a hard time with this one. I have a multi-dim array
$foo[$x][$y]['key'], where $x and $y
Torsten Roehr wrote:
Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Torsten Roehr wrote:
Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Greetings everyone :
Having a hard time with this one. I have a multi-dim array
$foo[$x][$y]['key'], where
Well, it does some sorting, but not quite what I'm after :(
I've managed to get the list so that all the (sub) entries are sorted in
the correct order. Now its just a matter of finding the highest expire
date for /each/ domain, and delete the other entries for that domain.
So, in the end,
Torsten Roehr wrote:
Well, it does some sorting, but not quite what I'm after :(
I've managed to get the list so that all the (sub) entries are sorted in
the correct order. Now its just a matter of finding the highest expire
date for /each/ domain, and delete the other entries for that domain.
OK, so it's just the other way round - I see. Instead of deleting the
entry
with the highest expiry date we delete all the others:
foreach ($foo as $key = $value) {
$tempArray = array();
foreach ($value as $subkey = $subvalue) {
// add
Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
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] =
Think this is what u want
Imran Asghar wrote:
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
?php $colors =
Hello Imran,
On 12 Feb 2004 at 1:17, Imran Asghar wrote:
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
On Saturday 31 January 2004 11:48, Shawn McKenzie wrote:
You would need to give an example of what you mean by change dynamically,
because if you can't predict the key indexes then how can you know which
ones to use in your anchor tag?
foreach ($arr as $key = $value) {
echo Key: $key;
On Fri, 2004-01-30 at 22:48, Shawn McKenzie wrote:
You would need to give an example of what you mean by change dynamically,
because if you can't predict the key indexes then how can you know which
ones to use in your anchor tag?
say this:
$menu = array (
'link1' = array(
Subject: Re: [PHP] Re: array block
On Fri, 2004-01-30 at 22:48, Shawn McKenzie wrote:
You would need to give an example of what you mean by change dynamically,
because if you can't predict the key indexes then how can you know which
ones to use in your anchor tag?
say this:
$menu = array
Brian V Bonini wrote:
I'm having array block, trying to format the data in a two dimensional
associative array.
foreach($menu as $k = $v) { etc..
need to end up with
a href=url title=titlelink(x)/a
Since it's two-dimensional, the $v you're getting is actually an array.
So you'll have to
foreach ($menu as $text = $array) {
$url = $array['url'];
$title = $array['title'];
echo a href=\$url\ title=\$title\$k/a\n;
}
HTH
-Shawn
Brian V Bonini [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having array block, trying to format the data in a two dimensional
Sorry, $k should be $text.
foreach ($menu as $text = $array) {
$url = $array['url'];
$title = $array['title'];
echo a href=\$url\ title=\$title\$text/a\n;
}
Shawn McKenzie [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
foreach ($menu as $text = $array) {
$url = $array['url'];
On Fri, 2004-01-30 at 18:47, Shawn McKenzie wrote:
Sorry, $k should be $text.
foreach ($menu as $text = $array) {
$url = $array['url'];
$title = $array['title'];
echo a href=\$url\ title=\$title\$text/a\n;
}
Gotcha, thanks! That'll work for this but for arguments sake what if the
You would need to give an example of what you mean by change dynamically,
because if you can't predict the key indexes then how can you know which
ones to use in your anchor tag?
-Shawn
Brian V Bonini [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
--
PHP General Mailing List
Cameron B. Prince wrote:
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.
You want:
if(isset($conf['hOpt'])) {
...
}
You should always use isset to check if a variable is set, whether
Of course. If it's a simple (short) array, you can just create a string
with the XML tags and array values, and write that to a file with an XML
extension.
More sexy would be to use the DOMXML functions in PHP.
http://us3.php.net/manual/en/ref.domxml.php
Guy named Kris wrote a great XML - PHP
Hello,
On 12/24/2003 02:44 PM, Chakravarthy Cuddapah wrote:
Is it possible to format data in array to XML and display ?
This class seems to do what you want. It requires DOM XML extension.
Class: XML Array
http://www.phpclasses.org/xmlarray
You may also want to try this class for generating XML
Hi Jason,
perhaps:
?php
$cases = array(5, 15, 30, 60, 90, 120);
if (in_array($count, $cases)) {
include 'page.php';
}
?
Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org
Jason Williard wrote:
I am building a script that I would like to have do a specific task
based on whether
Thanks! That did the trick.
Jason Williard
-Original Message-
From: Greg Beaver [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 6:55 PM
To: Jason Williard
Cc: [EMAIL PROTECTED]
Subject: Re: Array -- If
Hi Jason,
perhaps:
?php
$cases = array(5, 15, 30, 60, 90, 120);
if
When I needed it I could'n find it so I made my own.
function arrayToStr( $arr ){
$str = ;
while( true ){
$linea = current($arr);
$str = $str . $linea;
if( next($arr) == FALSE ){ break; }
$str = str . \n;// a newline separates each element.
}
point [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]...
Huhgood news :)))
Just solved it :
I'm on the role..
Y!
:)))
-
Your solution would be helpful.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Fri, 12 Sep 2003 18:58:22 -0400, Bill [EMAIL PROTECTED] wrote:
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
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 I
look at strlen() at php.net
Daniel J. Rychlik [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hmm, I just noticed that array dump counts the number of charaters and white
space and lables that number string... What function name is that ? The
string counter I mean ?
-Dan
--
PHP
I found this Great PHP Starter site check it out
http://www.htmlite.com/PHPintro.php
Ashley M. Kirchner [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have an array that looks like this:
$i = 0;
$item[$i] = array( 'link' = 'http://...',
'image' =
Your code works fine here (Apache 1.3.27/PHP 4.3.2)
However you can try
$room_type=array();
$room_type[0]=Array();
$room_type[0][0]=4;
echo BRvalue in array is .$room_type[0][0];
HTH
R'twick
Diana Castillo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If I write a code like this,
Try this:
Array[i][j] where i is the index of the array stored in the array and j is the index
of the value in the stored array.
Erich Kolb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
How do I get a value from an array thats inside of an array?
never done it, but check out:
http://www.php.net/manual/en/function.array-multisort.php
On Sat, 8 Feb 2003, Zydox wrote:
My question is if anyone have any idé on how to sort this array so that the
names and ages are sorted after Close Friend, Friend, Wife and last
Family...
$A[] = array
look at array_key_exists
Narciso Miguel Rodrigues [EMAIL PROTECTED] wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Is possible to do something like
if ($username in $users) ... or i need to do a foreach($user){...}
Thks
[MsR]
--
PHP General Mailing List
You should have session_start(); on every page that you want to hold the
session.
The way I would do what you are trying to achieve is go the $_SUPERGLOBALS
way..
on the submit_information.php page:
?php
session_start();
$_SESSION['image'] = $_POST['image'];
Files are attached..
Craig
Craig [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
You should have session_start(); on every page that you want to hold the
session.
The way I would do what you are trying to achieve is go the $_SUPERGLOBALS
way..
on the
i have an array like:
Array
(
[1] = Array
(
[alias] = foo
...
)
[2] = Array
(
[alias] = bar
...
)
...
)
I need some way to find out, if an alias foo is in the array. Any idea how
to do
I think this is more of an HTML problem than a PHP...
Put it inside td$here/td (or trtd$here/td/tr whichever you need)
and I'm sure the problem will go away.
- E
"Anthony Ritter" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'd like to have the record data -
if you have an array in javascript:
array1 = [1,2,3,4,5,6,7,8,'test'];
etc...
you can join it in JavaScript to make it a one string as:
array1 = array1.join('|');
then split in PHP to make it back an array:
?
$array1 = explode('|', $array1);
?
good luck,
Kale [EMAIL PROTECTED] wrote in
can do this:
$array = array('apple', 'pear', 'orange', 'apricot');
$array = array_flip($array);
$keyword = 'orange';
echo found '$orange' @ index: . $array[$keyword];
Don't use this method though! It makes your program slow!
Elias
Tim Fountain [EMAIL PROTECTED] wrote in message
[EMAIL
solved it thx anyway
Pafo [EMAIL PROTECTED] skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
i got my nice looking class like this:
?php
class Relic {
var $RelicName;
var $RelicType;
var $RelicRealm;
var $RelicOwner;
function PrintInfo() {
print
César aracena wrote:
The catch would be to make PHP to auto assign the relatives level by
knowing it has to start from $i=1 and loop $i++ until no other kid is
inserted. Now that I write it, it seems I could use a for loop, but what
should be the structure of it using the $name 0 you told
the name 0 was a sql-query - it will return a ressource which will
enable you to make something like
$i=0;
while($row = mysql_fetch_assoc($nameless_result){
#psuedo-code#
# mysql_query=(insert into table set relativenumber = 'jr$i' where
ID=$row[ID]);
}
[César L. Aracena] I think
(i am new to these groups, but shouldn't there be a follow-up-to on a
X-post?)
César aracena wrote:
I have this form in which one Administrator can insert new members and
after that, in another page, a form where he/she can insert the new
members sons daughters. I want to display a table
:56 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Re: ARRAY, IF INSERT
(i am new to these groups, but shouldn't there be a follow-up-to on a
X-post?)
César aracena wrote:
I have this form in which one Administrator can insert new members
and
after that, in another page
Might just be a typo, but in the function prototype for AddUser(), you have
$oUser, but the array_push() argument says $objUser.
J
J. Anderson Scarbrough wrote:
I have two classes. Organization and users.
In the organization class I am try to keep an array of user objects but it
does
1 - 100 of 142 matches
Mail list logo