Archive for January, 2017

How to perform case insensitive array search in php?

Searching is a usual and regular task in programming. Letters case sensitivity is a problematic in searching. Hence, both search string and array string should be converted into same case before searching. Otherwise searching would return the empty result. Here is how to do it: As shown above, search string is converted into lowercase and all the items of an array are converted to ... Full story

How to optimize if else statement in a smart way?

In this tutorial i am going to show how can we optimize the if else statement. This method can be used in any programming languages. I am going to show two different ways we can optimize the if else statement. lets see default if else statement: if( n % 2 == 0){ result = n + " is even number"; }else{ result ... Full story
Copyright © 2024 Programmer to Programmer- A website for web programming and mobile application programming tutorials.
Wordpress themes