• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

how to remove %20 in the url in php

php


PHP Snippet 1:

echo urldecode('newsdetail.php?id=In%20front%20%20of%20the%20houses');

PHP Snippet 2:

newsdetail.php?id=In front of the houses

PHP Snippet 3:

function cleanURL($textURL) {
  $URL = strtolower(preg_replace( array('/[^a-z0-9\- ]/i', '/[ \-]+/'), array('', '-'), $textURL));
            return $URL;
     }



while($row1=mysql_fetch_array($qry)) {
        <p class='news_title'><a href='newsdetail.php?id=".cleanURL($row1['news_heading'])."'>{$row1['news_heading']}</a></p>
    }

PHP Snippet 4:

$url = str_replace(' ', '-', strtolower($news_heading));

Related Snippets

How avoid Moved Permanently The document has moved here

Issue saving card for customer

send email using gmail-api and google-api-php-client

How to read laravel_session cookies saved in cookie memory of browser in client side?

How to change 'users' auth table and use another instead Laravel

Ajax GET request fails in laravel 8

Need to display only array value in JSON output

How to get an Array value inside an object in an array Php [duplicate]

passwordless LDAP login and get user information using Kerberos ticket in PHP

How to convert binary string to normal string in php

PHP date() with timezone?

Sum array values of a column within each column of an array with 3 levels

How to create a individual template for page or post in custom plugin?

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

Remove product downloads section in woocommerce email notifications

About Contact Privacy policy Terms and conditions