Horje
php replace spaces with dash Code Example
php replace spaces with dash
str_replace(' ', '-', $string);
php replace space with dash
<?php 
  $string = "hello php";
  $replace = str_replace(" ", "_", $string);
  echo $replace; // hello_php
?>
php replace all spaces with dashes
// Clean up multiple dashes or whitespaces
$string = preg_replace("/[\s-]+/", " ", $string);
// Convert whitespaces and underscore to dash
$string = preg_replace("/[\s_]/", "-", $string);




Php

Related
user-agent cURL php Code Example user-agent cURL php Code Example
if user logged in wordpress Code Example if user logged in wordpress Code Example
php change date format Code Example php change date format Code Example
php get first 5 characters of string Code Example php get first 5 characters of string Code Example
wordpress get domain Code Example wordpress get domain Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12