Re: Client side fatal PHP error

From: Date: Wed, 26 Dec 2001 01:53:55 +0000
Subject: Re: Client side fatal PHP error
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-78747@lists.php.net to get a copy of this message
Ah yes... that would do it. How embarrassing! But another respondent brought up an interesting question. Why does this error not show up every time? As written, it is a basic syntactical error. I tested this thing up and down; I test it in production every day. Ah.... it's always something.... thanks much. Philip Olson wrote in message ... >> "Call to unsupported or undefined function srtoupper() in.... on line 82." > >srt != str (typo). > >> if (strtoupper(substr($xmbrcode,11,1)) != "B" && >> strtoupper(substr($xmbrcode,11,1)) != "P" && >> srtoupper(substr($xmbrcode,11,1)) != "H" && >> srtoupper(substr($xmbrcode,11,1)) != "O").... { > >See above. Btw, consider something like: > > $str = '123456789abcdef'; > $bad = array('B','P','H','O'); > > if (in_array(strtoupper($str{11}),$bad)) { > echo 'boo'; > } > >I can't believe people code on Christmas :) > >Warm regards, >Philip Olson >

« previous php.general (#78747) next »