Check if a string exists javascript
<script type=”text/javascript”>
if(window.location.href.indexOf(“https:”) > -1) {
alert(“its a secure URL”);
}
</script>
<script type=”text/javascript”>
if(window.location.href.indexOf(“https:”) > -1) {
alert(“its a secure URL”);
}
</script>
<script type=”text/javascript”>
var string=”PHPCode”;
string=string.replace(“Code”,”Codez”);
alert(string);
</script>
CURTIME() returns the TIME part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested
Example
mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)
CURTIME() returns the TIME part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested
Example
mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)
CURDATE() returns the DATE part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested
Example
mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)
CURDATE() returns the DATE part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested
Example
mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)
Language constructs are used and behave almost similar to built-in functions .
The real difference lies in how PHP engine interprets a language construct and a built-in function. language constructs are relatively faster over built-in functions since they are bound to the language.Language Constructs Don’t Need Parenthesis .Language constructs are faster than built in functions
Below given are the examples
echo
die
if
print
unset
isset
empty
include
require