Skip to main content

PHP STRING FUNCTION WITH OUTPUT AND EXAMPLE

PHP STRING FUNCTION  WITH OUTPUT AND EXAMPLE
 <?php
  $var="my name is saddam hussain saifi ";

  print_r(explode("a",$var)); //output:Array ( [0] => my n [1] => me is s [2] => dd [3] => m huss [4] => in s [5] => ifi )
 
 
  echo crypt($varws);//output:-$1$m5/.1//.$KRawtTgnzzScShDJN3aHa.
 
  echo crc32($var);//output:-1732983884

 echo count_chars($var ,4);//output;-!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`bcgjklopqrtvwxz{|}~€ ‚ƒ„…†‡ˆ‰Š‹Œ Ž ’“”•–—˜™š›œ žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ

   echo convert_uuencode($var);//output:-@;7D@;F%M92!I
 
   echo convert_uudecode($var);// output:d4P L@M
 
  echo convert_cyr_string($var,'m','a');
 
 
  echo chunk_split($var,2,"(sam)");//output:-my(sam) n(sam)am(sam)e (sam)is(sam) s(sam)ad(sam)da(sam)m (sam)hu(sam)ss(sam)ai(sam)n (sam)sa(sam)if(sam)i (sam)
  
 echo chr(97);//a
 echo chr(98);//b
 echo chr(99);//c
 echo chr(100);//d
 echo chr(101);//e

 echo $var."<br/>";
 echo chop($var,"saifi");


 echo bin2hex($var);//output:-6d79206e616d652069732073616464616d206875737361696e20736169666920

 echo addslashes('What does "yolo" mean?');//output:-What does \"yolo\" mean?

 echo addcslashes($var," "); //output;-my\ name\ is\ saddam\ hussain\ saifi\

  echo stristr($var,"saifi");

 $f="name";
echo substr_replace($var,"pappu",100);

$f="saifi";
echo str_replace($f,"pappu",$var);

 echo str_repeat($var,10);
echo strpbrk($var,"h");

$var="abc";
echo $var=substr(str_shuffle($var),0,1);

echo strrev($var);
echo "<br/>";
echo $var;

echo substr($var,5);
echo substr($var,5,12);

  $var1=strlen($var);
//echo substr_count($var ,"saifi");
echo str_pad($var , $var1 ,"<a href=' ".$var." '>".$var." ");

echo count_chars($var);
echo wordwrap($var,15,'<br/>');
echo $var1=str_word_count($var);
echo ucwords($var);

echo $var=strtoupper($var);
echo "<br/>";
echo lcfirst($var);
echo "<br/>";
echo $var=strtolower($var);
echo "<br/>";
echo ucfirst($var);

echo ltrim($var);
echo "<br/>";
echo trim($var);
echo "<br/>";
echo trim($var);

echo($var);
echo "<br/>";
print($var);
echo "<br/>";
printf($var);
echo "<br/>";
print_r($var);


?>

Comments

Popular posts from this blog

Minimum and maximum number with - and + 500 in Mysql and Sql query and Find out table scheema of our database in Mysql and sql query and Find out all table name of our database in Mysql and sql query and Find out current date and time in mysql and sql help of sql query

Minimum and maximum number with - and + 500 in Mysql and Sql query:- syntax:-  SELECT MIN(Used)-500 , max(Used)+500 FROM audit Find out current date and time in mysql and sql help of sql query:- syntax:- SELECT now() Find out database name in Mysql and sql query:- syntax:-  SELECT DATABASE(); Find out all table name of our database in Mysql and sql query:- syntax:- SHOW TABLES; Find out   table scheema   of our database in Mysql and sql query:- syntax:- DESCRIBE <table name>;

Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Sidebar Top" sidebar.

Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Sidebar Top" sidebar. add this code:-wp-include/config.php   change: define('WP_DEBUG', flase);  to below code here: // Enable WP_DEBUG mode define('WP_DEBUG', true); // Enable Debug logging to the /wp-content/debug.log file define('WP_DEBUG_LOG', true); // Disable display of errors and warnings  define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors',0);

Wordpress Database tabel Description image

Wordpress Database tabel Description image