
Search In
1> To delete an element from an array, use reject as shown below:
arr = ['a','b','c','d','e']
arr.reject! { |i| i.match('d')}
Result :=> ["a", "b", "c", "e"]
2> To delete particular keys from the array whose elements are also arrays,
This method is used to get the elements after given specified id. Using this method we can get value from the input text field. But before to get value from input field , we need to define id for the input field.
Syntax:
document.getElementById("na
Hello Readers ,
In cakephp development framework we will use $this->set() several times .
The set() method is basically use to create a variable in our view file i.e. ctp file .
If suppose we have an array $userprofile and we want to use this i
Hello readres, today we discuss about "Get Cookies from Php Curl into a variable?".
CURL provides an option (CURLOPT_RETURNTRANSFER) to set a callback that will be called for each response header line. The function will receive the curl object and a
You can take reference form below example to fetch data from array list using php.
This method is really very easy.
<?php
// you have to Decode the array and store a variable
$GetRecord = json_decode('[{"Name":"Mac","age":"25"},{"Name":"Warner
what is count() function
The count() is utilize to count all data elements in an array, or in other word we can say The count() function returns the number of elements in an array.
You can see below example of count() function.
<?php
Use a combination of JavaScript Math methods: random to generate a random value
between 0 and 1, which is then multiplied by 255.
var randomNumber = Math.floor(Math.random() * 255);
console.log(randomNumber);
The random method generates a random n
Foursquare authenticate API returns all the information related to user's fourSquare account. In this response under "user" tag there is a tag "photo" with two other tags "prefix" and "suffix" like below.
photo = {
prefix = "https://irs1
//Call ajax function on autocomplete in jquery
$(document).ready(function(){
jQuery("#name").autocomplete({
source: function(request, response) {
$.ajax({
url: 'include/get.php',
type: "POST",
<h2>//Call ajax function on autocomplete in jquery</h2>
$(document).ready(function(){
jQuery("#name").autocomplete({
source: function(request, response) {
$.ajax({
url: 'include/get.php',
