I am explaining you, how to calculate number of Age from date of birth in PHP. if you want to show user’s age from date of birth so you can use this process and show Age in php. here I will use some function like date(), date_create() and date_diff() that need to used to calculate […]
Tag: PHP
PHP how to get all the keys of an associative array?
I am explaining you, how to get all the keys of an associative array in PHP. we need to use PHP array_keys() function to extract the keys in an associative array. Example : Output : Otherway, I will apply foreach loop so it will also show key and its related values. Example : Output : […]
How to merge two array into single array in php ?
I am explaining you, how to merge two array into single array in php. we can use array_merge() function in php code so that will merge two different array into single array.here I having two array called arrayfirst and arraysecond array, I will merge both array into single array with arraymerge new array. Example : […]
PHP How to check if a variable is null?
I am explaining you, how to check if a variable is null or not in PHP. I will check null values through is_null() function in PHP. Example : Output : Azhar ShaikhHello, Welcome to webdeveloperindia.in. I am a full-stack web developer. Email – [email protected] | Skype – azaruddin23. I have knowledge of PHP, Laravel, Magento […]
PHP how to generate random numbers?
I am explaining you, how to generate random numbers in PHP. I will use rand() function to generate random numbers. rand() function can able to use to generate a random number with specific range like starting number is 1 and ending number id 999 so it will generate random number in between. you can use […]
Magento 2 useful command Part 1
Today, I am explaining you, if you are developing Magento 2 website so this post is very useful for you. I am providing you list of magento 2 command. here is some basic commands list that are related to Cache, Admin, Modules, Indexer and Info commands. I have also mentioned some short command so you […]
How to extract data/content between HTML Tags in PHP
I am explaining you, how to extract data/content between HTML Tags in PHP.preg_match() function provide functionality to extract text between HTML tags with REGEX in PHP. we can get content between tags with the use of regular expressions with preg_match() function in PHP. Example : we can find result will be stored in $matchdata variable. […]
PHP check if website is online
I am explaining you, how to check website availability/online with use of PHP and Curl. you can check if website is online/available in PHP. It uses PHP and cURL code. after check website’s status we can define it is online/available or not. Output : Azhar ShaikhHello, Welcome to webdeveloperindia.in. I am a full-stack web developer. […]
comparing string in PHP by strcmp() function
I am explaining you, how to compare two string in PHP by using the strcmp() function. it is case-sensitive function. strcmp() function will take two string as parameter string1 and string2. if function will return < 0 then the first string is less than the second string, if it will return > 0 then the […]
How to Send an Email in PHP
I am explaining you, how to Send an Email in PHP. email if very important functionality in website. here I will use mail() function to send email in php. in PHP’s mail() we can send email to many recipients using headers. we can add headers such as From, Cc, and Bcc. we can also use […]