PHP Zastąp przestrzeń podkreśleniem
$str = str_replace(' ', '_', $str);
Annoyed Alpaca
$str = str_replace(' ', '_', $str);
//Replace space with %20 for url to understand
$new = str_replace(' ', '%20', $your_string);
//Alternate for URL use, use this
urlencode ( string $str )
$journalName = preg_replace('/\s+/', '_', $journalName);
$journalName = str_replace(' ', '_', $journalName);
$journalName = preg_replace('/\s+/', '_', $journalName);