Re: [PHP] problem with array

2007-07-15 Thread Jim Lucas
Ross wrote: I am using postcode anywhere for a 'where's my nearest' function. All the geographical info is contained in an array, which when dumped looks like this var_dump ($result); array(1) { [0]= array(13) { [origin_postcode]= string(7) EH2 2BE [destination_postcode]= string(6) EH2 2BE

Re: [PHP] Problem with array

2005-06-17 Thread Rory Browne
Not sure if it works for numeric indices, but maybe you could replace $piece[3] with (array_key_exists(3, $piece) ? $piece[3] : ). If you want you could abstract that into a function, like function array_access_element($key, $srch_array, $def=){ return array_key_exists($key, $srch_array) ?

Re: [PHP] Problem with array

2005-06-17 Thread Rick Emery
Quoting Ross [EMAIL PROTECTED]: As with my previous post the problem is the pieces of the array can vary from 1 to 4 items. So pieces 3 and 4 are often undefined giving the 'undefined index' notice. All I really want to do is display the array pieces if they EXIST. But as they are inside a echo

RE: [PHP] Problem with array

2005-06-17 Thread Leila Lappin
: Friday, June 17, 2005 2:30 PM To: php-general@lists.php.net Subject: Re: [PHP] Problem with array Quoting Ross [EMAIL PROTECTED]: As with my previous post the problem is the pieces of the array can vary from 1 to 4 items. So pieces 3 and 4 are often undefined giving the 'undefined index' notice

Re: [PHP] Problem with array

2005-05-01 Thread Richard Lynch
On Sun, May 1, 2005 10:21 am, Murray @ PlanetThoughtful said: ? function listProjectChildren($contid, $list=''){ if ($contid''){ $arrtree = array(); $arrtree = buildProjectTree($contid, $level=1); for

RE: [PHP] Problem with array

2005-05-01 Thread Murray @ PlanetThoughtful
, 2 May 2005 5:04 AM To: Murray @ PlanetThoughtful Cc: php-general@lists.php.net Subject: Re: [PHP] Problem with array On Sun, May 1, 2005 10:21 am, Murray @ PlanetThoughtful said: ? [Here there be snippage: please see original post for outline of problem] -- PHP General Mailing List

RE: [PHP] Problem with array

2005-05-01 Thread Richard Lynch
On Sun, May 1, 2005 1:08 pm, Murray @ PlanetThoughtful said: Color me confused. I removed global $arrtree; and added $arrtree = array(); to the function buildProjectTree() and now the parent function (listProjectChildren) returns no values at all. I've checked the page from which

RE: [PHP] Problem with array

2005-05-01 Thread Murray @ PlanetThoughtful
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Monday, 2 May 2005 6:16 AM To: Murray @ PlanetThoughtful Cc: php-general@lists.php.net Subject: RE: [PHP] Problem with array On Sun, May 1, 2005 1:08 pm, Murray @ PlanetThoughtful said: Color me confused. I

RE: [PHP] Problem with array

2005-05-01 Thread Richard Lynch
On Sun, May 1, 2005 1:46 pm, Murray @ PlanetThoughtful said: -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Monday, 2 May 2005 6:16 AM To: Murray @ PlanetThoughtful Cc: php-general@lists.php.net Subject: RE: [PHP] Problem with array On Sun, May 1, 2005 1:08

Re: [PHP] Problem with array

2004-12-15 Thread Jason Wong
On Thursday 16 December 2004 13:33, Ahmed Abdel-Aliem wrote: Put this at the beginning of all your code: error_reporting(E_ALL); ini_set('display_errors', TRUE); Then run your code to see all the errors and warnings and notices that it generates. Then incorporate the changes below: i

Re: [PHP] problem with array

2004-10-19 Thread Minuk Choi
- Original Message - From: Dale Hersowitz [EMAIL PROTECTED] To: 'Minuk Choi' [EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 12:38 AM Subject: RE: [PHP] problem with array Minuk, After much searching and asking, I found the answer to my problem. It turns out that after re-attaching my

RE: [PHP] problem with array

2004-10-15 Thread Graham Cossey
Hi guys, Recently, I had to reformat one of the web servers and now I have encountered an unusual problem. I am not sure whether this is an issue which can be fixed in the .ini file or whether its specific to the version of php I am using. Here is the problem: $query=SELECT * FROM

Re: [PHP] problem with array

2004-10-14 Thread Jason Wong
On Friday 15 October 2004 09:58, Dale Hersowitz wrote: For some reason, on the last row, I am not unable to reference a particular index in the array using a php variable. This has been working for almost 12 months and now the coding is breaking all over the place. I don't have an answer. Any

Re: [PHP] problem with array

2004-10-14 Thread Minuk Choi
$selectedCol=$row[selectedCol]; echo $selectedCol; $selectedColName=$row[$selectCol]; //--- PLEASE NOTE THIS SPECIFIC ROW Please give me the output, what do you get from echo $selectedCol;? If I had to guess, it looks like you're confusing key and value of an associatative array.

Re: [PHP] Problem with array variables in forms

2003-02-18 Thread Chris Pudney
G'day, It appears that when the URL contains square brackets (i.e. %5B and %5D instead of [ and ]) then PHP doesn't parse the variables correctly. For example, http://www.offloadonline.com/test.php?personal[name]=johnpersonal[email]=john%40blah.com works (you might need to paste the URL

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Rick Emery
It helps if you show us all your code, not just what you think we might need. For isntance, what does your mysql_query() statement look like? Does it have an or die(mysql_error())) clause? - Original Message - From: Janyne Kizer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday,

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Janyne Kizer
Thanks for taking a look at this. ?php mysql_connect (, , ); mysql_select_db (); $result = mysql_query(SELECT * FROM clubs WHERE id=$id); $row = mysql_fetch_array($result); print Reading affiliations...; $affiliation_result = mysql_query(SELECT

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Rick Emery
will forget what you said. People will forget what you did. But people will never forget how you made them feel. - Original Message - From: Janyne Kizer [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 17, 2003 9:31 AM Subject: Re: [PHP] Problem

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Janyne Kizer
what you said. People will forget what you did. But people will never forget how you made them feel. - Original Message - From: Janyne Kizer [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 17, 2003 9:31 AM Subject: Re: [PHP] Problem creating

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Rick Emery
feel. - Original Message - From: Janyne Kizer [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 17, 2003 9:31 AM Subject: Re: [PHP] Problem creating array from MySql query Thanks for taking a look at this. ?php mysql_connect (, ,

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Janyne Kizer
you did. But people will never forget how you made them feel. - Original Message - From: Janyne Kizer [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 17, 2003 9:31 AM Subject: Re: [PHP] Problem creating array from MySql query Thanks

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Rick Emery
17, 2003 9:51 AM Subject: Re: [PHP] Problem creating array from MySql query No error. It just times out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Janyne Kizer
will forget what you did. But people will never forget how you made them feel. - Original Message - From: Janyne Kizer [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 17, 2003 9:51 AM Subject: Re: [PHP] Problem creating array from MySql query

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Leif K-Brooks
[EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 17, 2003 9:51 AM Subject: Re: [PHP] Problem creating array from MySql query No error. It just times out. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt

Re: [PHP] Problem with array

2002-04-30 Thread Richard Emery
show the form. - Original Message - From: Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED] To: PHP-GENERAL [EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 10:11 AM Subject: [PHP] Problem with array Hello All, I've got a form that creates checkboxes based on the number of rows

Re: [PHP] Problem Inserting Array of Rows from form

2001-07-15 Thread Hank Marquardt
For one, as you've written it you have a mismatch of columns vs. fields -- You're combining id and name into one field for the insert -- thus you have five fields trying to be inserted into a table with six elemets. You should have a print of the mysql_error() in your debug code ... I bet if

Re: [PHP] Problem Inserting Array of Rows from form

2001-07-15 Thread David
I did add mysql_error which helped me solve part of the problem: I was missing a single quote in the $val line after $id[$i] and before songname : Here is the corrected code but there is still a problem, $vals .=, ('$id[$i]', '$songname[$i]', '$rating[$i]', '$video[$i]', '$album_id[$i]',