Re: [PHP] help with multi dimensional arrays

2007-05-24 Thread Micky Hulse

Micky Hulse wrote:

Looks like you are missing a comma on line 3.


Doi, meant "semi-colon", not comma... Lol.

Also, when I get PHP errors, if not obvious, I check the previous line 
also... If says something like "error on line 7" I will look at both 
line six and seven.


Of course, depends on error message. Yadda yadda... I still feel like a 
dork for saying comma.


Hehe,
Cheers
M


--
Wishlists: 
   Switch: 
 BCC?: 
   My: 

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



Re: [PHP] help with multi dimensional arrays

2007-05-24 Thread Richard Lynch


On Wed, May 23, 2007 9:59 pm, James Lockie wrote:
> I get a syntax error on strlen.
>
>
> $newTypes = array();
> $newTypes[0] = array();
> $newTypes[0][0] = "Starting with"
> $newTypes[0][1] = strlen( $newTypes[0][0] );

If you are missing the ; in the line before, PHP gets pretty confused
and tries to smush the two lines together, essentially, and then...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] help with multi dimensional arrays

2007-05-24 Thread Zoltán Németh
2007. 05. 23, szerda keltezéssel 22.59-kor James Lockie ezt írta:
> I get a syntax error on strlen.
> 
> 
> $newTypes = array();
> $newTypes[0] = array();
> $newTypes[0][0] = "Starting with"

you missed the ending ; on that line

greets
Zoltán Németh

> $newTypes[0][1] = strlen( $newTypes[0][0] );
> 

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



Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Steve Finkelstein
Might I suggest using an IDE to develop your code in. It would be able
to spot simple oversights such as syntax errors. I personally use Zend
Studio, however if you aren't looking to invest in a license, there are
plenty of open source solutions out there.

Cheers,

- sf

James Lockie wrote:
> Paul Novitski wrote:
>>
>>> Looks like you are missing a comma on line 3.
>>>
>>> James Lockie wrote:
 I get a syntax error on strlen.

$newTypes = array();
$newTypes[0] = array();
$newTypes[0][0] = "Starting with"
$newTypes[0][1] = strlen( $newTypes[0][0] );
>>
>>
>> Missing semicolon;
>>
>> Paul
> Argh, that is the worst error. :-(
> The error messages in PHP suck.
> 

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



Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Greg Donald

On 5/23/07, James Lockie <[EMAIL PROTECTED]> wrote:

Argh, that is the worst error. :-(
The error messages in PHP suck.


When I run your code it says:

Parse error: syntax error, unexpected T_VARIABLE in
/opt/local/apache2/htdocs/missing.php on line 5

If you did not get a similar error you may need to increase your error
reporting level and ensure your ability to actually see the errors as
well.  This is what I use in development:

error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
ini_set( 'log_errors', 1 );


--
Greg Donald
http://destiney.com/

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



Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread James Lockie

Paul Novitski wrote:



Looks like you are missing a comma on line 3.

James Lockie wrote:

I get a syntax error on strlen.

   $newTypes = array();
   $newTypes[0] = array();
   $newTypes[0][0] = "Starting with"
   $newTypes[0][1] = strlen( $newTypes[0][0] );



Missing semicolon;

Paul

Argh, that is the worst error. :-(
The error messages in PHP suck.

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



Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Paul Novitski



Looks like you are missing a comma on line 3.

James Lockie wrote:

I get a syntax error on strlen.

   $newTypes = array();
   $newTypes[0] = array();
   $newTypes[0][0] = "Starting with"
   $newTypes[0][1] = strlen( $newTypes[0][0] );



Missing semicolon;

Paul 


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



Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Micky Hulse

Looks like you are missing a comma on line 3.

James Lockie wrote:

I get a syntax error on strlen.


   $newTypes = array();
   $newTypes[0] = array();
   $newTypes[0][0] = "Starting with"
   $newTypes[0][1] = strlen( $newTypes[0][0] );





--
Wishlists: 
   Switch: 
 BCC?: 
   My: 

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



[PHP] help with multi dimensional arrays

2007-05-23 Thread James Lockie

I get a syntax error on strlen.


   $newTypes = array();
   $newTypes[0] = array();
   $newTypes[0][0] = "Starting with"
   $newTypes[0][1] = strlen( $newTypes[0][0] );

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