Usage of for loop in Jquery syntax with example

Here am going to explain the use of for loop in JQuery with an example

Add a page ajax_angular_view.php with response format



 <div><input id="update_company_name_comapny1" type="text" value="" /></div>
<div><input id="update_company_name_comapny2" type="text" value="" /></div>
<div><input id="update_company_name_comapny3" type="text" value="" /></div>
var company_id=1
                url: "ajax_angular_view.php?action=view_company_info_by_id&company_id="+company_id,
                type: "post",
                success: function(data) {
                    var obj = JSON.parse(data);
		for(var k in obj) {

How to add Auto suggestion in Jquery by customer name for customer id

T o add Auto suggestion in jquery for customer name and customer id

    source : function (request, response) {
        $.getJSON("ajax_angular_view.php?action=view_customers", {
            term: request.term
        }, function(data) {                     
            var array = data.error ? [] : $.map(data.Clist, function(m) {
                return {
                    value: m.value
    },   select: function (event, ui) {
        $("#customer_name").val(ui.item.label); // display the selected text
        $("#user_id").val(ui.item.value); // save selected id to hidden input
        return false;
,    focus: function(event, ui) {

ajax_angular_view.php?action=view_customers Result should be

{“Clist”:[{“name”:”Hareram Sharma”,”value”:”1″},{“name”:”Jitender”,”value”:”2″},{“name”:”soni”,”value”:”3″}]}

How to install LAMP in AWS server

Amazon Web Services is a one of the most flexible hosting service providers,but most of them are facing difficult how to install  LAMP (Apache , MySQL and PHP ) in AWS with out using paid Cpanel service . Here am going to ellobrate by steps how to install LAMP in AWS server

1 Install Apache

# sudo yum install httpd

# sudo systemctl start httpd.service

#sudo systemctl enable httpd.service

Try https://IP ADDRESS in browsers

 2  Install Database

#sudo yum install mariadb-server mariadb

# sudo yum install mariadb-server mariadb

# sudo mysql_secure_installation

#sudo systemctl enable mariadb.service

3) Install phpMyAdmin

# sudo yum Install phpMyAdmin

Try  http://yourIPaddress/phpmyadmin