- str_replace: documentation ( source)
<?php
$value = str_replace( ' ', "\n", 'abc efg hij' );
$value = str_replace( ' ', "\n", array( 'abc', 'efg', 'hij' ) );
// What about for boolean, int, float?
$value = str_replace( ' ', "\n", false );
$value = str_replace( ' ', "\n", -100 );
$value = str_replace( ' ', "\n", 100.25 );