Tag Archives: String

wordwrap()

It wraps a string into new lines when it reaches a specific length.

Example

<?php
echo wordwrap(“It wraps a string into new lines when it reaches a specific length”,5);
?>

Output

It wraps a string into new lines when it reaches a specific length

Share

vfprintf()

It writes a formatted string to a specified output stream

Example

<?php
$file = fopen(“test.txt”,”w”);
echo vfprintf($file,”%s%s”,array(“PHP”,”Code”));
?>

Output

7

Share