• 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

generating a random code in php?

Combining a describing and one array with data

Inserting data into SQL Server Db An Invalid direction was specified

How to fix Call to undefined method AppModelsTableName::factory?

Explode not working properly with dash

codeigniter 4 running error first time with xampp

Edit product hook WooCommerce

advanced custom fields wordpress custom class

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

Fatal error: Array callback has to contain indices 0 and 1

How to add a heading in between checkout fields of WooCommerce

How to use PHPCBF to fix one issue at a time?

Image upload not working through ajax Laravel

How to make autocomplete work in foreach php loop? (vscode, intellisense)

About Contact Privacy policy Terms and conditions