• 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

CodeIgniter 4: Like and Dislike Functionality

how to redirect the user back to desired URL after login page in PHP?

How to get monthly wise data in laravel

Make Calculator - When Button clicked the No shows in Textbox.

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Laravel Mix Uncaught ReferenceError: $ is not defined

401 Unauthorized only occurring on some pages in Laravel 8

How to make dot match newline characters using regular expressions

CodeIgniter force_download is not working

If action is on a different page do I use fwrite function

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

Unable to guess the mime type as no guessers are available Laravel 5.2

How to set dynamic `home` and `siteurl` in WordPress?

How can I convert from a{a{} b{}} to a[a[],b[]] using php preg_match?

Adding hreflang tags automatically in WordPress subdirectory multisite

About Contact Privacy policy Terms and conditions