Re: [PHP] If...Or...Else

2004-07-24 Thread Marcus Strube
>if ((condition1 == TRUE) OR (condition2 == TRUE)) {
> do something;
>   } esle {
> do something else;
>   }
> ?>
>
> What's the correct syntax for the If line?

if(true == condition1 || true == condition2) {
echo "Hello World";
} else {
echo "Best Regards";
}

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



Re: [PHP] PHP Form Field Validation

2004-07-19 Thread Marcus Strube
> If (formfieldname = empty())

[snip]
$value = "0";

if(true==empty($value)) {
echo "it's empty";
}
[/snip]

May be good to know.

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



Re: [PHP] HTML numeric string

2004-07-21 Thread Marcus Strube
Am Mittwoch, 21. Juli 2004 11:36 schrieb Koriun A. Margarian:
> Hello
>
> how to convert HTML numeric string like
>  ղաբա
> to original text ?
>
> --
> Best regards,
>  Koriunmailto:[EMAIL PROTECTED]

$dirty_data

$search4[0] = "/,/";
$search4[1] = "/A/";   

$replacewith[0] = " ";
$replacewith[1] = " ";

$cleaned_data = preg_replace($search4,$replacewith,$dirty_data);

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



[PHP] Trouble with sin()

2004-07-22 Thread Marcus Strube
Hi,

i'm working with PHP 5.0.0 (Linux) and have some trouble using function sin(). 
In PHPs opinion

sin(20) 

is 

0.912945250728

I have had a look at the bug.php.net, but couldn`t find anything. Is it a bug 
or am I just misunderstanding something??

Marcus

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



Re: [PHP] Trouble with sin()

2004-07-22 Thread Marcus Strube
Thanks a lot. I've overseen a word in the manual. Now i got it.

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