[PHP] Re: what is wrong with my big array

2006-03-07 Thread Ross
get a parse error!

$region_array = array('a' ='All of Scotland', 1 ='Aberdeen City Council', 
2 ='Aberdeenshire Council', 3 ='AngusCouncil', 5 ='Argyll and Bute 
Council', 6 = 'Clackmannanshire Council', 9 ='Dumfries and Gallowalloway', 
10 = 'Dundee City Council', 11 = 'East Ayrshire Council', 13 = 'East 
Dunbartonshire', 14 = 'East Lothian Council', 15 = 'East Renfrewshire 
Council', 16 ='Edinburgh City Council', 17 ='Falkirk Council', 18 ='Fife 
Council', 20 ='Highland Council', 21 ='Inverclyde Council', 22 
='Midlothian Council', 23 = 'Moray Council', 24 ='North Ayrshire 
Council', 25 ='North Lanarkshire Council', 26 ='Orkney Islands Council', 
27 ='Perth  Kinross Council', 28 = 'Renfrewshire Council',29 ='Scottish 
Borders Council', 30 =  'Shetland Isles Council', 31 ='South Ayrshire 
Council', 32 = 'South Lanarkshire Council', 33 = 'Stirling Council', 34 
='West Dunbartonshire', 35 = 'West Lothian Council', 8 = 'Comhairle nan 
Eilean');
  ? 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: what is wrong with my big array

2006-03-07 Thread Ray Hauge
On Tuesday 07 March 2006 08:08, Ross wrote:
 $region_array = array('a' ='All of Scotland', 1 ='Aberdeen City Council',
 2 ='Aberdeenshire Council', 3 ='AngusCouncil', 5 ='Argyll and Bute
 Council', 6 = 'Clackmannanshire Council', 9 ='Dumfries and
 Gallowalloway', 10 = 'Dundee City Council', 11 = 'East Ayrshire Council',
 13 = 'East Dunbartonshire', 14 = 'East Lothian Council', 15 = 'East
 Renfrewshire Council', 16 ='Edinburgh City Council', 17 ='Falkirk
 Council', 18 ='Fife Council', 20 ='Highland Council', 21 ='Inverclyde
 Council', 22
 ='Midlothian Council', 23 = 'Moray Council', 24 ='North Ayrshire
 Council', 25 ='North Lanarkshire Council', 26 ='Orkney Islands Council',
 27 ='Perth  Kinross Council', 28 = 'Renfrewshire Council',29 ='Scottish
 Borders Council', 30 =  'Shetland Isles Council', 31 ='South Ayrshire
 Council', 32 = 'South Lanarkshire Council', 33 = 'Stirling Council', 34
 ='West Dunbartonshire', 35 = 'West Lothian Council', 8 = 'Comhairle nan
 Eilean');

After the 30 element you have a space after the '=' like: =  instead of 
=

HTH

-- 
Ray Hauge
Programmer/Systems Administrator
American Student Loan Services
http://www.americanstudentloan.com
1.800.575.1099

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: what is wrong with my big array

2006-03-07 Thread Ross
Nice spot ray! 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: what is wrong with my big array

2006-03-07 Thread Stut

Ross wrote:


get a parse error!

$region_array = array('a' ='All of Scotland', 1 ='Aberdeen City Council', 
2 ='Aberdeenshire Council', 3 ='AngusCouncil', 5 ='Argyll and Bute 
Council', 6 = 'Clackmannanshire Council', 9 ='Dumfries and Gallowalloway', 
10 = 'Dundee City Council', 11 = 'East Ayrshire Council', 13 = 'East 
Dunbartonshire', 14 = 'East Lothian Council', 15 = 'East Renfrewshire 
Council', 16 ='Edinburgh City Council', 17 ='Falkirk Council', 18 ='Fife 
Council', 20 ='Highland Council', 21 ='Inverclyde Council', 22 
='Midlothian Council', 23 = 'Moray Council', 24 ='North Ayrshire 
Council', 25 ='North Lanarkshire Council', 26 ='Orkney Islands Council', 
27 ='Perth  Kinross Council', 28 = 'Renfrewshire Council',29 ='Scottish 
Borders Council', 30 =  'Shetland Isles Council', 31 ='South Ayrshire 
Council', 32 = 'South Lanarkshire Council', 33 = 'Stirling Council', 34 
='West Dunbartonshire', 35 = 'West Lothian Council', 8 = 'Comhairle nan 
Eilean');
 ? 


You might want to consider laying your code out in a more readable format.

$region_array = array(
   'a' = 'All of Scotland',
 1 = 'Aberdeen City Council',
 2 = 'Aberdeenshire Council',
 3 = 'AngusCouncil',
 5 = 'Argyll and Bute Council',
 6 = 'Clackmannanshire Council',
 9 = 'Dumfries and Gallowalloway',
10 = 'Dundee City Council',
11 = 'East Ayrshire Council',
13 = 'East Dunbartonshire',
14 = 'East Lothian Council',
15 = 'East Renfrewshire Council',
16 = 'Edinburgh City Council',
17 = 'Falkirk Council',
18 = 'Fife Council',
20 = 'Highland Council',
21 = 'Inverclyde Council',
22 = 'Midlothian Council',
23 = 'Moray Council',
24 = 'North Ayrshire Council',
25 = 'North Lanarkshire Council',
26 = 'Orkney Islands Council',
27 = 'Perth  Kinross Council',
28 = 'Renfrewshire Council',
29 = 'Scottish Borders Council',
30 =  'Shetland Isles Council',
31 = 'South Ayrshire Council',
32 = 'South Lanarkshire Council',
33 = 'Stirling Council',
34 = 'West Dunbartonshire',
35 = 'West Lothian Council',
 8 = 'Comhairle nan Eilean');

As already pointed out, there is a space between the = and  after the 
30. Laying code out like this also tends to limit the amount of code you 
need to look at to find syntax errors like this since PHP happily points 
to the precise line.


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: what is wrong with my big array

2006-03-07 Thread João Cândido de Souza Neto
I think that the error is in the line above that.

Ross wrote:

 get a parse error!
 
 $region_array = array('a' ='All of Scotland', 1 ='Aberdeen City
 Council', 2 ='Aberdeenshire Council', 3 ='AngusCouncil', 5 ='Argyll and
 Bute Council', 6 = 'Clackmannanshire Council', 9 ='Dumfries and
 Gallowalloway', 10 = 'Dundee City Council', 11 = 'East Ayrshire
 Council', 13 = 'East Dunbartonshire', 14 = 'East Lothian Council', 15 =
 'East Renfrewshire Council', 16 ='Edinburgh City Council', 17 ='Falkirk
 Council', 18 ='Fife Council', 20 ='Highland Council', 21 ='Inverclyde
 Council', 22 ='Midlothian Council', 23 = 'Moray Council', 24 ='North
 Ayrshire Council', 25 ='North Lanarkshire Council', 26 ='Orkney Islands
 Council', 27 ='Perth  Kinross Council', 28 = 'Renfrewshire Council',29
 ='Scottish Borders Council', 30 =  'Shetland Isles Council', 31 ='South
 Ayrshire Council', 32 = 'South Lanarkshire Council', 33 = 'Stirling
 Council', 34 ='West Dunbartonshire', 35 = 'West Lothian Council', 8 =
 'Comhairle nan Eilean');
   ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: what is wrong with my big array

2006-03-07 Thread João Cândido de Souza Neto
You're Right. I don't saw that.

Stut wrote:

 Ross wrote:
 
get a parse error!

$region_array = array('a' ='All of Scotland', 1 ='Aberdeen City
Council', 2 ='Aberdeenshire Council', 3 ='AngusCouncil', 5 ='Argyll and
Bute Council', 6 = 'Clackmannanshire Council', 9 ='Dumfries and
Gallowalloway', 10 = 'Dundee City Council', 11 = 'East Ayrshire
Council', 13 = 'East Dunbartonshire', 14 = 'East Lothian Council', 15 =
'East Renfrewshire Council', 16 ='Edinburgh City Council', 17 ='Falkirk
Council', 18 ='Fife Council', 20 ='Highland Council', 21 ='Inverclyde
Council', 22 ='Midlothian Council', 23 = 'Moray Council', 24 ='North
Ayrshire Council', 25 ='North Lanarkshire Council', 26 ='Orkney Islands
Council', 27 ='Perth  Kinross Council', 28 = 'Renfrewshire Council',29
='Scottish Borders Council', 30 =  'Shetland Isles Council', 31 ='South
Ayrshire Council', 32 = 'South Lanarkshire Council', 33 = 'Stirling
Council', 34 ='West Dunbartonshire', 35 = 'West Lothian Council', 8 =
'Comhairle nan Eilean');
  ?

 You might want to consider laying your code out in a more readable format.
 
 $region_array = array(
 'a' = 'All of Scotland',
   1 = 'Aberdeen City Council',
   2 = 'Aberdeenshire Council',
   3 = 'AngusCouncil',
   5 = 'Argyll and Bute Council',
   6 = 'Clackmannanshire Council',
   9 = 'Dumfries and Gallowalloway',
  10 = 'Dundee City Council',
  11 = 'East Ayrshire Council',
  13 = 'East Dunbartonshire',
  14 = 'East Lothian Council',
  15 = 'East Renfrewshire Council',
  16 = 'Edinburgh City Council',
  17 = 'Falkirk Council',
  18 = 'Fife Council',
  20 = 'Highland Council',
  21 = 'Inverclyde Council',
  22 = 'Midlothian Council',
  23 = 'Moray Council',
  24 = 'North Ayrshire Council',
  25 = 'North Lanarkshire Council',
  26 = 'Orkney Islands Council',
  27 = 'Perth  Kinross Council',
  28 = 'Renfrewshire Council',
  29 = 'Scottish Borders Council',
  30 =  'Shetland Isles Council',
  31 = 'South Ayrshire Council',
  32 = 'South Lanarkshire Council',
  33 = 'Stirling Council',
  34 = 'West Dunbartonshire',
  35 = 'West Lothian Council',
   8 = 'Comhairle nan Eilean');
 
 As already pointed out, there is a space between the = and  after the
 30. Laying code out like this also tends to limit the amount of code you
 need to look at to find syntax errors like this since PHP happily points
 to the precise line.
 
 -Stut

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: what is wrong?

2002-09-12 Thread lallous

try this:
if (empty(trim($_POST[new_password1])))
{
  echo 'Empty!!!';
}

Meltem Demirkus [EMAIL PROTECTED] wrote in message
001701c25a2c$4758d4a0$5583@hiborya">news:001701c25a2c$4758d4a0$5583@hiborya...
 Hi,
 I want to understand what is wrong with this code?I am trying to
understand
 when an empty inputs come from form and I will then give a warning
message..

 if($_POST[new_password1] ==)

 echo empty input;



 thanks..

 meltem




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: what is wrong?

2002-09-12 Thread David Robley

In article 001701c25a2c$4758d4a0$5583@hiborya, mdemirkus@momentum-
dmt.com says...
 Hi,
 I want to understand what is wrong with this code?I am trying to understand
 when an empty inputs come from form and I will then give a warning message..
 
 if($_POST[new_password1] ==)
 
 echo empty input;
 
 
 
 thanks..
 
 meltem

Well, you are comparing it to a non-empty string of three spaces rather 
than an empty value .


-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: what is wrong?

2002-09-12 Thread Erwin

Meltem Demirkus wrote:
 Hi,
 I want to understand what is wrong with this code?I am trying to
 understand when an empty inputs come from form and I will then give a
 warning message.. 
 
 if($_POST[new_password1] ==)
 
 echo empty input;

And as final addition, you probably have to use

$_POST[new_password1]

Besides that, I would use the form of Lallous:

if ( empty( trim( $_POST[ new_password1 ] )
echo Empty!;

HTH
Erwin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: what is wrong?

2002-09-12 Thread lallous

I'ld also add isset() to avoid warnings too:

if (isset($_POST['new_password1']) 
!empty(trim(isset($_POST['new_password1']
{
  echo i am not empty, you can do whatever;
}
else
{
  echo i am empty! show error message;
}

Erwin [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Meltem Demirkus wrote:
  Hi,
  I want to understand what is wrong with this code?I am trying to
  understand when an empty inputs come from form and I will then give a
  warning message..
 
  if($_POST[new_password1] ==)
 
  echo empty input;

 And as final addition, you probably have to use

 $_POST[new_password1]

 Besides that, I would use the form of Lallous:

 if ( empty( trim( $_POST[ new_password1 ] )
 echo Empty!;

 HTH
 Erwin




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php