:disabled Selector in jQuery

It helps to selects all elements that are disabled.

:disabled Selector

// HTML Form
<form>
<input name=”filed01″ disabled=”disabled”>
<input name=”filed02″>
</form>

// To finds all input elements that are disabled and change it value.

$( “input:disabled” ).val( “This field is disabled” );

Read more

.each() in jQuery

It iterate over a jQuery object, executing a function for each matched element.

.each()

// To alert the text of each < li> element:

$(“button”).click(function(){
    $(“li”).each(function(){
       alert($(this).text())
    });
});

Read more

How to declare an array in PHP?

In PHP, the array() function is using to create an array.

1. $fruits = array(‘apple’, ‘orange’, ‘pineapple’);

2. $cars =array();
    $cars[0]=”Maruthi”;
    $cars[1]=”Benz”;
    $cars[2]=”Figo”;

3. $ages = array(“Kiran”=”25″,”Vipin”=”28″,”Sanooj”=”27”);… Read more