Code

How to install php curl in Ubuntu

Many times we come across web applications which are written in PHP and require curl extension. PHP curl functions can used through use of libcurl. The libcurl was create by Daniel Sternberg. With the help of libcurl you can connect and communicate with webserver using different protocols. To install curl library on your Ubuntu computer, 

Continue Reading…

php array length

PHP sizeof() Function Example Return the number of elements in an array: Definition and Usage The sizeof() function returns the number of elements in an array. The sizeof() function is an alias of the count() function. Syntax sizeof(array,mode);   Parameter Description array Required. Specifies the array mode Optional. Specifies the 

Continue Reading…

php array count

PHP count() Function Example Return the number of elements in an array: Definition and Usage The count() function returns the number of elements in an array. Syntax count(array,mode);   Parameter Description array Required. Specifies the array mode Optional. Specifies the mode. Possible values: 0 – Default. Does not count all 

Continue Reading…

php string split

PHP explode() Function Example Break a string into an array: Definition and Usage The explode() function breaks a string into an array. Note: The “separator” parameter cannot be an empty string. Note: This function is binary-safe. Syntax explode(separator,string,limit)   Parameter Description separator 

Continue Reading…

file open in PHP 5.5

Definition and Usage The fopen() function opens a file or URL. If fopen() fails, it returns FALSE and an error on failure. You can hide the error output by adding an ‘@’ in front of the function name. Syntax fopen(filename,mode,include_path,context)   Parameter Description filename Required. Specifies the file or URL to open mode Required. Specifies 

Continue Reading…

How to get length of Javascript Object

Introduction : There is no direct method to find length of an javascript object so I have created a method by which we can get length of javascript object. Use following method to get the length of javascript object. Object.size = function(obj) { var size = 0, key; for (key in obj) { if (obj.hasOwnProperty(key)) 

Continue Reading…

How to install php pear on Ubuntu 15.04

When using PHP, the PEAR Package Manager is already installed unless one has used the ./configure option –without-pear. If one uses a version of PHP that is supplied by Unix/Linux/BSD distributors it may be necessary to manually install PEAR. Users should consult the documentation for the respective distribution in this case. If you want to 

Continue Reading…

localStorage in Javascript

Introduction localStorage is used in javascript for storing data in clients side i.e. in the browser of user. There is no expiration time in localStorage that means the data stored in localStorage will not destroyed after closing or restarting the browser.   Usage For storing data in localStorage use this syntax localStorage.setItem(‘something’, ‘Daves’); For getting 

Continue Reading…

Javascript string contains

JavaScript String indexOf() Method Definition and Usage The indexOf() method returns the position of the first occurrence of a specified value in a string. This method returns -1 if the value to search for never occurs. Note: The indexOf() method is case sensitive. Syntax string.indexOf(searchvalue,start) Parameter Values Parameter Description searchvalue Required. The string to search 

Continue Reading…

« Older Posts