1). Explain following function with example?
1).charactarct, 2)substr(php),3)sqrt,4)Array(php)
2). Explain onblur and change event with example?
pls reply me urgent
|
Newbie Member
|
|
| 24Aug2010,08:52 | #2 |
|
1). Explain following function with example?
1).charactarct, 2)substr(php),3)sqrt,4)Array(php) 2). Explain onblur and change event with example? pls reply me urgent |
|
Contributor
|
|
| 25Aug2010,00:23 | #3 |
|
For this question always you can find answers on PHP manual.
But i never heard charactarct... |
|
Ambitious contributor
|
|
| 31Aug2010,23:47 | #4 |
|
simple your first function does not exist in php.
Second substr() lets you grab text from another text based on its start point and end point. This is based on the total number of characters in the text. substr() takes 3 arguments the first being the original text, the second the start point as a number, and the end point as a number. It expects you to know the character length of your text before hand. Every text is counted for its character count, meaning text in php is made up of individual characters, and characters are letters, numbers and symbols. PHP Code:
Code:
ghost Third sqrt() is the math function square root and only excepts numbers. I dont know your level of math but square root is the number times itself that equals the current number being asked its square root. PHP Code:
Code:
44.575778176045 Fourth an array is away to list/group values together. PHP supports numbered arrays, associative arrrays, and multi-dimensional arrays. to declare an array simple create a variable and use either the array function or the square brackets with a value inside to create an array. PHP Code:
PHP Code:
Code:
i PHP Code:
Code:
myself fifth onblur and onchange are used on input boxes in html. HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Untitled 3</title> </head> <body> <form method="post" action="#"> <input type="text" value="username" onfocus="if(this.value == 'username') this.value = '';" onblur="if (this.value == '') this .value = 'username';" onchange="if (this.value == 'pein87') window.alert('welcome back pein-sama');" /> <input type="password" /> </form> </body> </html> There explained and exampled. |
