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
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 ($
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( "<", ">" );
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
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
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;
6 matches
Mail list logo