龙空技术网

php014_04视频演示文档

趣易编程 122

前言:

而今各位老铁们对“phpsubstr_count”都比较着重,各位老铁们都想要学习一些“phpsubstr_count”的相关知识。那么小编在网上收集了一些有关“phpsubstr_count””的相关资讯,希望咱们能喜欢,你们一起来学习一下吧!

<?php

//* 字符串的比较

//$a = 'zhAng.docxg.danddg.d';

//

//$c = 'zhacd';

//* 按r字节

//echo strcmp( $a, $c ); //

//echo '</p>';

//

//echo strnatcmp( $a, $c ); //

//

//echo '</p>';

//

//echo strncmp( $a, $c, 5 );//

//$bl = strstr( $a, '.' );

//echo $bl;

//echo '</p>';

//$bl = strrchr( $a, '.' );

//var_dump( $bl );

//echo substr_count( $a, 'g.d' );

//echo str_ireplace( 'a', '*', $a );

//echo '</p>';

//echo str_replace( 'A', '*', $a );

//echo '</p>';

//echo str_ireplace( ['a','d'], ['W','?'], $a );

//$n = 12345566.026811;

//

////echo number_format( $n, 4 );

//

//echo number_format( $n, 3, '.', ':' );

//echo '</p>';

//$s = 'aaa';

//$c = 'ccc';

////'zhang aaa rong ccc';

////echo sprintf( "zhang %s rong %s", $s, $c );

//echo 'zhang '.$s.' rong '.$c;

$str = 'a b c d efg hi jk';

$arr = explode( ' ', $str );

echo '<pre>';

print_r( $arr );

echo implode( 'ijk', $arr );

//$str = 'a,c,ccc,wxhz,zhang';

//$arr = explode( ',', $str );

//print_r( $arr );

标签: #phpsubstr_count