Executing php inside php example
1. Create a index.php, [php] <?php echo "welcome to ngdeveloper.com"; ?> [/php] 2. Create a ExecPHP.php, [php] <?php echo exec("D:\\xampp\\php\\php.exe […]
» Read morenext gen Developer
1. Create a index.php, [php] <?php echo "welcome to ngdeveloper.com"; ?> [/php] 2. Create a ExecPHP.php, [php] <?php echo exec("D:\\xampp\\php\\php.exe […]
» Read moreProgram: <?php $link = mysql_connect(‘localhost’, ‘username’, ‘password’); if (!$link) { die(‘Could not connect: ‘ . mysql_error()); } echo ‘Connected successfully’; […]
» Read moreSubstring replacements: Syntax: substr_replace($existing_string,$overwritting string,$int_start,$int_length); Example: substr_replace(‘my dog’,’cat’,3,3); my cat substr_replace(“my\ndog”,”cat”,3,3); my cat […]
» Read moreSubstring: If you want to extract substring from a given string then use the Syntax: substr($string_input,$int_start,$int_length) Example: substr(‘God is love’,7,4); […]
» Read moreProgram: array_substring.php <?php $rainbow = blUe; print $rainbow[2]; ?> Output: Thanks for reading this post……….!!!
» Read moreThe fwrite() is used to write the contents to text file. Syntax: fwrite($fp,’content’); // content will be written $fp pointer […]
» Read moreSyntax: range($start,$end); Example: range(1,10); Program: range.php <?php $number=range(1,10); print_r($number); ?> Output: Thanks for reading this post…………!!! […]
» Read moreIt is used to convert variables into an array. Syntax: settype($variable_name,’array’); Program: settype.php <?php $variable=25; echo “its variable\t=$variable\n\n”; settype($variable,’array’); […]
» Read moreJoin is used to convert an array variable to string variable. Program: join.php <?php $array5=array(‘mother’,’father’,’brother’,’sister’); echo “printing as array\n”; print_r($array5); […]
» Read moreThe array_map() function iterate through array and send and get back the new value from the user defined function. Syntax: […]
» Read more