为什么php里每个词之间加空格呢?有什么作用?

print($tableau['cli_login'].$tableau['cli_name']'<br />'); }
假如我想在每个login,name之间加n个空格,代码怎么打呢?谢谢

猛跑小猪
浏览 199回答 2
2回答

慕妹3146593

 方法如下:  <?php  //Prepends whitespace to each line of a string  function white_space( $string, $whitespace )  {  //Create an array from the string, each key having one line  $string = explode( PHP_EOL, $string );  //Loop through the array and prepend the whitespace  foreach( $string as $line => $text )  {  $string[ $line ] = $whitespace . $text;  }  //Return the string  return( implode( PHP_EOL, $string ) );  }  ?>  

暮色呼如

html代码 &nbsp; 这个就是空格 &@nbsp; 去掉@
打开App,查看更多内容
随时随地看视频慕课网APP