note 26811 added to function.sqrt

From: Date: Wed, 13 Nov 2002 18:37:28 +0000
Subject: note 26811 added to function.sqrt
Groups: php.notes 
Request: Send a blank email to php-notes+get-39453@lists.php.net to get a copy of this message
Checking if the square you want to take from a number is valid or not (you can't take the root of a negative number) if ($i<0) { echo "Error! The number you specified can't be rooted! It's negative! } else { echo "The square root of your number is ".sqrt($i); } -- http://www.php.net/manual/en/function.sqrt.php http://master.php.net/manage/user-notes.php?action=edit+26811 http://master.php.net/manage/user-notes.php?action=delete+26811 http://master.php.net/manage/user-notes.php?action=reject+26811

« previous php.notes (#39453) next »