Daniel Convissor wrote:
On Mon, Mar 10, 2008 at 09:28:29AM -0400, Kenneth Downs wrote:
function arraySafe($array,$key,$default='') {
if(isset($array[$key]))
return $array[$key];
else
return $default;
}
Though this does get tripped up by $array[$key] being NULL.
array_key_ex
On Mon, Mar 10, 2008 at 09:28:29AM -0400, Kenneth Downs wrote:
>
> function arraySafe($array,$key,$default='') {
> if(isset($array[$key]))
> return $array[$key];
> else
> return $default;
> }
Though this does get tripped up by $array[$key] being NULL.
array_key_exists() is more accura
I am actually using IIS in this particular installation. But I guess restarting
it would do the job as well?
> Date: Mon, 10 Mar 2008 10:25:14 -0500
> From: [EMAIL PROTECTED]
> To: talk@lists.nyphp.org
> Subject: Re: [nyphp-talk] displaying error messages from PHP 5.2.4
>
> You shouldn't have t
You shouldn't have to reboot. Restarting (or stopping, then starting)
apache should do the job.
~Rolan
alexey tkachenko wrote:
Thanks for your help!
It seems like what I needed was a reboot of the system. The changes I
made to php.ini file were applied after I rebooted, so I'm able to
see
Thanks for your help!
It seems like what I needed was a reboot of the system. The changes I made to
php.ini file were applied after I rebooted, so I'm able to see the errors
displayed properly now.
> Subject: Re: [nyphp-talk] displaying error messages from PHP 5.2.4
> To: talk@lists.nyphp.
On Mon, Mar 10, 2008 at 9:28 AM, Kenneth Downs <[EMAIL PROTECTED]> wrote:
>
> function arraySafe($array,$key,$default='') {
> if(isset($array[$key]))
> return $array[$key];
> else
> return $default;
> }
>
Yes, very useful pattern. Handy for grabbing input out of $_GET and
$_POST ar
Alexy,
Turn on HTML errors.
>; Disable the inclusion of HTML tags in error messages.
>; Note: Never use this feature for production boxes.
>html_errors = Off
>
___
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NY
Michael B Allen wrote:
Is there any preference for:
$val = isset($arr['key']) ? $arr['key'] : null;
vs:
$val = @$arr['key'];
?
Oftentimes I like to check for a key value, and then supply a default if
it is not there. It can be useful to make up a routine that does this
for you all in o