Silahkan Melihat Tutorial di website kami dengan nyaman ENJOY YOUR LIFE ☕

How can I replace whitespace with underscores in php?

The \s character class will match whitespace characters. I've added the + quantifier to collapse multiple whitespace to one _. If you don't want that, remove the +

$picture =preg_replace('/\s+/', '_', uniqid()."_".$image_name);




0 komentar:

Post a Comment

How can I replace whitespace with underscores in php?