[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

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

[PHP] showing source

2007-05-18 Thread James Lockie
This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for reading!'); } else { $tags = array( , );

[PHP] Re: showing source

2007-05-18 Thread James Lockie
M.Sokolewicz wrote: Why don't you use: highlight_file(__FILE__) ? I didn't know about that. Awesome, thanks. :-) I used the highlight_num from the comments to show line numbers. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] preg_match

2007-02-06 Thread James Lockie
I am trying to use this code to display a button at the root but it always displays the button. :-( if (! (preg_match( /$\/index.php/, $_SERVER['PHP_SELF'] ))) { # display a button -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_match

2007-02-06 Thread James Lockie
Myron Turner wrote: James Lockie wrote: I am trying to use this code to display a button at the root but it always displays the button. :-( if (! (preg_match( /$\/index.php/, $_SERVER['PHP_SELF'] ))) { # display a button You got the end-of-string character ($) in the wrong place